Skip to content
  1. Jul 18, 2012
    • Jack Carter's avatar
      Mips specific inline asm operand modifier 'M': · a62ba828
      Jack Carter authored
      Print the high order register of a double word register operand.
      
      In 32 bit mode, a 64 bit double word integer will be represented
      by 2 32 bit registers. This modifier causes the high order register
      to be used in the asm expression. It is useful if you are using 
      doubles in assembler and continue to control register to variable
      relationships.
      
      This patch also fixes a related bug in a previous patch:
      
          case 'D': // Second part of a double word register operand
          case 'L': // Low order register of a double word register operand
          case 'M': // High order register of a double word register operand
      
      I got 'D' and 'M' confused. The second part of a double word operand
      will only match 'M' for one of the endianesses. I had 'L' and 'D'
      be the opposite twins when 'L' and 'M' are.
      
      llvm-svn: 160429
      a62ba828
    • Andrew Trick's avatar
      indvars: Linear function test replace should avoid reusing undef. · c0872662
      Andrew Trick authored
      Fixes PR13371: indvars pass incorrectly substitutes 'undef' values.
      
      I do not like this fix. It's needed until/unless the meaning of undef
      changes. It attempts to be complete according to the IR spec, but I
      don't have much confidence in the implementation given the difficulty
      testing undefined behavior. Worse, this invalidates some of my
      hard-fought work on indvars and LSR to optimize pointer induction
      variables. It results benchmark regressions, which I'll track
      internally. On x86_64 no LTO I see:
      
      -3% huffbench
      -3% 400.perlbench
      -8% fhourstones
      
      My only suggestion for recovering is to change the meaning of
      undef. If we could trust an arbitrary instruction to produce a some
      real value that can be manipulated (e.g. incremented) according to
      non-undef rules, then this case could be easily handled with SCEV.
      
      llvm-svn: 160421
      c0872662
    • Craig Topper's avatar
      Make x86 asm parser to check for xmm vs ymm for index register in gather... · 01deb5f2
      Craig Topper authored
      Make x86 asm parser to check for xmm vs ymm for index register in gather instructions. Also fix Intel syntax for gather instructions to use 'DWORD PTR' or 'QWORD PTR' to match gas.
      
      llvm-svn: 160420
      01deb5f2
    • Joel Jones's avatar
      More replacing of target-dependent intrinsics with target-indepdent · b84f7bea
      Joel Jones authored
      intrinsics.  The second instruction(s) to be handled are the vector versions 
      of count set bits (ctpop).
      
      The changes here are to clang so that it generates a target independent 
      vector ctpop when it sees an ARM dependent vector bits set count.  The changes 
      in llvm are to match the target independent vector ctpop and in 
      VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM 
      dependent vector pop counts with target-independent ctpops.  There are also 
      changes to an existing test case in llvm for ARM vector count instructions and 
      to a test for the bitcode upgrade.
      
      <rdar://problem/11892519>
      
      There is deliberately no test for the change to clang, as so far as I know, no
      consensus has been reached regarding how to test neon instructions in clang;
      q.v. <rdar://problem/8762292>
      
      llvm-svn: 160410
      b84f7bea
  2. Jul 17, 2012
  3. Jul 16, 2012
    • Evan Cheng's avatar
      For something like · 75315b87
      Evan Cheng authored
      uint32_t hi(uint64_t res)
      {
              uint_32t hi = res >> 32;
              return !hi;
      }
      
      llvm IR looks like this:
      define i32 @hi(i64 %res) nounwind uwtable ssp {
      entry:
        %lnot = icmp ult i64 %res, 4294967296
        %lnot.ext = zext i1 %lnot to i32
        ret i32 %lnot.ext
      }
      
      The optimizer has optimize away the right shift and truncate but the resulting
      constant is too large to fit in the 32-bit immediate field. The resulting x86
      code is worse as a result:
              movabsq $4294967296, %rax       ## imm = 0x100000000
              cmpq    %rax, %rdi
              sbbl    %eax, %eax
              andl    $1, %eax
      
      This patch teaches the x86 lowering code to handle ult against a large immediate
      with trailing zeros. It will issue a right shift and a truncate followed by
      a comparison against a shifted immediate.
              shrq    $32, %rdi
              testl   %edi, %edi
              sete    %al
              movzbl  %al, %eax
      
      It also handles a ugt comparison against a large immediate with trailing bits
      set. i.e. X >  0x0ffffffff -> (X >> 32) >= 1
      
      rdar://11866926
      
      llvm-svn: 160312
      75315b87
    • Nadav Rotem's avatar
      · 839a06e9
      Nadav Rotem authored
      Make ComputeDemandedBits return a deterministic result when computing an AssertZext value.
      In the added testcase the constant 55 was behind an AssertZext of type i1, and ComputeDemandedBits
      reported that some of the bits were both known to be one and known to be zero.
      
      Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
      
      llvm-svn: 160305
      839a06e9
    • Tom Stellard's avatar
      Revert "test/CodeGen/R600: Add some basic tests v6" · fc3db614
      Tom Stellard authored
      This reverts commit 11d3457afcda7848448dd7f11b2ede6552ffb9ea.
      
      llvm-svn: 160300
      fc3db614
    • Kostya Serebryany's avatar
      [asan] refactor instrumentation to allow merging the crash callbacks (not... · 874dae61
      Kostya Serebryany authored
      [asan] refactor instrumentation to allow merging the crash callbacks (not fully implemented yet, no functionality change except the BB order)
      
      llvm-svn: 160284
      874dae61
    • Jack Carter's avatar
      Doubleword Shift Left Logical Plus 32 · f649043a
      Jack Carter authored
      Mips shift instructions DSLL, DSRL and DSRA are transformed into
      DSLL32, DSRL32 and DSRA32 respectively if the shift amount is between
      32 and 63
      
      Here is a description of DSLL:
      
      Purpose: Doubleword Shift Left Logical Plus 32
      To execute a left-shift of a doubleword by a fixed amount--32 to 63 bits
      
      Description: GPR[rd] <- GPR[rt] << (sa+32)
      
      The 64-bit doubleword contents of GPR rt are shifted left, inserting
       zeros into the emptied bits; the result is placed in
      GPR rd. The bit-shift amount in the range 0 to 31 is specified by sa.
      
      This patch implements the direct object output of these instructions.
      
      llvm-svn: 160277
      f649043a
    • Alexey Samsonov's avatar
      Fix tests that failed on i686-win32 after r160248: · 893d3d33
      Alexey Samsonov authored
      1. FileCheck-ize epilogue.ll and allow another asm instruction to restore %rsp.
      2. Remove check in widen_arith-3.ll that was hitting instruction in epilogue instead of
      vector add.
      
      llvm-svn: 160274
      893d3d33
    • Tom Stellard's avatar
      test/CodeGen/R600: Add some basic tests v6 · 6693fbe3
      Tom Stellard authored
      llvm-svn: 160273
      6693fbe3
    • Nadav Rotem's avatar
      Fix a bug in the 3-address conversion of LEA when one of the operands is an · 4968e45b
      Nadav Rotem authored
      undef virtual register. The problem is that ProcessImplicitDefs removes the
      definition of the register and marks all uses as undef. If we lose the undef
      marker then we get a register which has no def, is not marked as undef. The
      live interval analysis does not collect information for these virtual
      registers and we crash in later passes.
      
      Together with Michael Kuperstein <michael.m.kuperstein@intel.com>
      
      llvm-svn: 160260
      4968e45b
    • Chandler Carruth's avatar
      Revert r160254 temporarily. · 8b540ab3
      Chandler Carruth authored
      It turns out that ASan relied on the at-the-end block insertion order to
      (purely by happenstance) disable some LLVM optimizations, which in turn
      start firing when the ordering is made more "normal". These
      optimizations in turn merge many of the instrumentation reporting calls
      which breaks the return address based error reporting in ASan.
      
      We're looking at several different options for fixing this.
      
      llvm-svn: 160256
      8b540ab3
    • Chandler Carruth's avatar
      Teach AddressSanitizer to create basic blocks in a more natural order. · 3dd6c814
      Chandler Carruth authored
      This is particularly useful to the backend code generators which try to
      process things in the incoming function order.
      
      Also, cleanup some uses of IRBuilder to be a bit simpler and more clear.
      
      llvm-svn: 160254
      3dd6c814
    • Chandler Carruth's avatar
      Add a basic test for AddressSanitizer. This is just a bare-bones · 663943e2
      Chandler Carruth authored
      functionality test.
      
      In general, unless the functionality is substantially separated, we
      should lump more basic testing into this file. The test running
      infrastructure likes having a few test files with more comprehensive
      testing within them.
      
      llvm-svn: 160253
      663943e2
    • Alexey Samsonov's avatar
      This CL changes the function prologue and epilogue emitted on X86 when stack needs realignment. · dcc1291d
      Alexey Samsonov authored
      It is intended to fix PR11468.
      
      Old prologue and epilogue looked like this:
      push %rbp
      mov %rsp, %rbp
      and $alignment, %rsp
      push %r14
      push %r15
      ...
      pop %r15
      pop %r14
      mov %rbp, %rsp
      pop %rbp
      
      The problem was to reference the locations of callee-saved registers in exception handling:
      locations of callee-saved had to be re-calculated regarding the stack alignment operation. It would
      take some effort to implement this in LLVM, as currently MachineLocation can only have the form
      "Register + Offset". Funciton prologue and epilogue are now changed to:
      
      push %rbp
      mov %rsp, %rbp
      push %14
      push %15
      and $alignment, %rsp
      ...
      lea -$size_of_saved_registers(%rbp), %rsp
      pop %r15
      pop %r14
      pop %rbp
      
      Reviewed by Chad Rosier.
      
      llvm-svn: 160248
      dcc1291d
  4. Jul 15, 2012
  5. Jul 14, 2012
    • Nadav Rotem's avatar
      Add a dagcombine optimization to convert concat_vectors of undefs into a single undef. · 01892100
      Nadav Rotem authored
      The unoptimized concat_vectors isd prevented the canonicalization of the vector_shuffle node.
      
      llvm-svn: 160221
      01892100
    • Andrew Trick's avatar
      LSR Fix: check SCEV expression safety before expansion. · 653513b8
      Andrew Trick authored
      All SCEV expressions used by LSR formulae must be safe to
      expand. i.e. they may not contain UDiv unless we can prove nonzero
      denominator.
      
      Fixes PR11356: LSR hoists UDiv.
      
      llvm-svn: 160205
      653513b8
    • Joel Jones's avatar
      This is one of the first steps at moving to replace target-dependent · 43cb8783
      Joel Jones authored
      intrinsics with target-indepdent intrinsics.  The first instruction(s) to be 
      handled are the vector versions of count leading zeros (ctlz).
      
      The changes here are to clang so that it generates a target independent 
      vector ctlz when it sees an ARM dependent vector ctlz.  The changes in llvm 
      are to match the target independent vector ctlz and in VMCore/AutoUpgrade.cpp 
      to update any existing bc files containing ARM dependent vector ctlzs with 
      target-independent ctlzs.  There are also changes to an existing test case in 
      llvm for ARM vector count instructions and a new test for the bitcode upgrade.
      
      <rdar://problem/11831778>
      
      There is deliberately no test for the change to clang, as so far as I know, no
      consensus has been reached regarding how to test neon instructions in clang;
      q.v. <rdar://problem/8762292>
      
      llvm-svn: 160200
      43cb8783
  6. Jul 13, 2012
  7. Jul 12, 2012
Loading