Skip to content
  1. Apr 10, 2012
  2. Apr 09, 2012
    • Rafael Espindola's avatar
      Pattern match a setcc of boolean value with 0 as a truncate. · 8f62b324
      Rafael Espindola authored
      llvm-svn: 154322
      8f62b324
    • Nadav Rotem's avatar
      Lower some x86 shuffle sequences to the vblend family of instructions. · fb7e2ae5
      Nadav Rotem authored
      llvm-svn: 154313
      fb7e2ae5
    • Nadav Rotem's avatar
      Fix a bug in the lowering of broadcasts: ConstantPools need to use the target pointer type. · b801ca39
      Nadav Rotem authored
      Move NormalizeVectorShuffle and LowerVectorBroadcast into X86TargetLowering.
      
      llvm-svn: 154310
      b801ca39
    • Chandler Carruth's avatar
      Cleanup and relax a restriction on the matching of global offsets into · 3779ac10
      Chandler Carruth authored
      x86 addressing modes. This allows PIE-based TLS offsets to fit directly
      into an addressing mode immediate offset, which is the last remaining
      code quality issue from PR12380. With this patch, that PR is completely
      fixed.
      
      To understand why this patch is correct to match these offsets into
      addressing mode immediates, break it down by cases:
      1) 32-bit is trivially correct, and unmodified here.
      2) 64-bit non-small mode is unchanged and never matches.
      3) 64-bit small PIC code which is RIP-relative is handled specially in
         the match to try to fit RIP into the base register. If it fails, it
         now early exits. This behavior is unchanged by the patch.
      4) 64-bit small non-PIC code which is not RIP-relative continues to work
         as it did before. The reason these immediates are safe is because the
         ABI ensures they fit in small mode. This behavior is unchanged.
      5) 64-bit small PIC code which is *not* using RIP-relative addressing.
         This is the only case changed by the patch, and the primary place you
         see it is in TLS, either the win64 section offset TLS or Linux
         local-exec TLS model in a PIC compilation. Here the ABI again ensures
         that the immediates fit because we are in small mode, and any other
         operations required due to the PIC relocation model have been handled
         externally to the Wrapper node (extra loads etc are made around the
         wrapper node in ISelLowering).
      
      I've tested this as much as I can comparing it with GCC's output, and
      everything appears safe. I discussed this with Anton and it made sense
      to him at least at face value. That said, if there are issues with PIC
      code after this patch, yell and we can revert it.
      
      llvm-svn: 154304
      3779ac10
    • Chandler Carruth's avatar
      Fold 15 tiny test cases into a single file that implements the · 84b83426
      Chandler Carruth authored
      comprehensive testing of TLS codegen for x86. Convert all of the ones
      that were still using grep to use FileCheck. Remove some redundancies
      between them.
      
      Perhaps most interestingly expand the test cases so that they actually
      fully list the instruction snippet being tested. TLS operations are
      *very* narrowly defined, and so these seem reasonably stable. More
      importantly, the existing test cases already were crazy fine grained,
      expecting specific registers to be allocated. This just clarifies that
      no *other* instructions are expected, and fills in some crucial gaps
      that weren't being tested at all.
      
      This will make any subsequent changes to TLS much more clear during
      review.
      
      llvm-svn: 154303
      84b83426
  3. Apr 08, 2012
    • Duncan Sands's avatar
      Only have codegen turn fdiv by a constant into fmul by the reciprocal · 2f1dc381
      Duncan Sands authored
      when -ffast-math, i.e. don't just always do it if the reciprocal can
      be formed exactly.  There is already an IR level transform that does
      that, and it does it more carefully.
      
      llvm-svn: 154296
      2f1dc381
    • Chandler Carruth's avatar
      Teach LLVM about a PIE option which, when enabled on top of PIC, makes · ede4a8aa
      Chandler Carruth authored
      optimizations which are valid for position independent code being linked
      into a single executable, but not for such code being linked into
      a shared library.
      
      I discussed the design of this with Eric Christopher, and the decision
      was to support an optional bit rather than a completely separate
      relocation model. Fundamentally, this is still PIC relocation, its just
      that certain optimizations are only valid under a PIC relocation model
      when the resulting code won't be in a shared library. The simplest path
      to here is to expose a single bit option in the TargetOptions. If folks
      have different/better designs, I'm all ears. =]
      
      I've included the first optimization based upon this: changing TLS
      models to the *Exec models when PIE is enabled. This is the LLVM
      component of PR12380 and is all of the hard work.
      
      llvm-svn: 154294
      ede4a8aa
    • Nadav Rotem's avatar
      AVX2: Build splat vectors by broadcasting a scalar from the constant pool. · 82609df6
      Nadav Rotem authored
      Previously we used three instructions to broadcast an immediate value into a
      vector register.
      On Sandybridge we continue to load the broadcasted value from the constant pool.
      
      llvm-svn: 154284
      82609df6
  4. Apr 07, 2012
  5. Apr 06, 2012
  6. Apr 05, 2012
    • Jakob Stoklund Olesen's avatar
      Don't break the IV update in TLI::SimplifySetCC(). · 37492eac
      Jakob Stoklund Olesen authored
      LSR always tries to make the ICmp in the loop latch use the incremented
      induction variable. This allows the induction variable to be kept in a
      single register.
      
      When the induction variable limit is equal to the stride,
      SimplifySetCC() would break LSR's hard work by transforming:
      
         (icmp (add iv, stride), stride) --> (cmp iv, 0)
      
      This forced us to use lea for the IC update, preventing the simpler
      incl+cmp.
      
      <rdar://problem/7643606>
      <rdar://problem/11184260>
      
      llvm-svn: 154119
      37492eac
  7. Apr 03, 2012
  8. Apr 02, 2012
  9. Apr 01, 2012
    • Nadav Rotem's avatar
      This commit contains a few changes that had to go in together. · b0783508
      Nadav Rotem authored
      1. Simplify xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B))
         (and also scalar_to_vector).
      
      2. Xor/and/or are indifferent to the swizzle operation (shuffle of one src).
         Simplify xor/and/or (shuff(A), shuff(B)) -> shuff(op (A, B))
      
      3. Optimize swizzles of shuffles:  shuff(shuff(x, y), undef) -> shuff(x, y).
      
      4. Fix an X86ISelLowering optimization which was very bitcast-sensitive.
      
      Code which was previously compiled to this:
      
      movd    (%rsi), %xmm0
      movdqa  .LCPI0_0(%rip), %xmm2
      pshufb  %xmm2, %xmm0
      movd    (%rdi), %xmm1
      pshufb  %xmm2, %xmm1
      pxor    %xmm0, %xmm1
      pshufb  .LCPI0_1(%rip), %xmm1
      movd    %xmm1, (%rdi)
      ret
      
      Now compiles to this:
      
      movl    (%rsi), %eax
      xorl    %eax, (%rdi)
      ret
      
      llvm-svn: 153848
      b0783508
  10. Mar 31, 2012
  11. Mar 30, 2012
  12. Mar 29, 2012
  13. Mar 27, 2012
  14. Mar 25, 2012
    • Eli Bendersky's avatar
      Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu · f3308605
      Eli Bendersky authored
      * Removed test/lib/llvm.exp - it is no longer needed 
      * Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
        left in the test suite so this code is no longer required. test/lit.cfg is
        now much shorter and clearer 
      * Removed a lot of duplicate code in lit.local.cfg files that need access to
        the root configuration, by adding a "root" attribute to the TestingConfig
        object. This attribute is dynamically computed to provide the same
        information as was previously provided by the custom getRoot functions. 
      * Documented the config.root attribute in docs/CommandGuide/lit.pod
      
      llvm-svn: 153408
      f3308605
  15. Mar 22, 2012
  16. Mar 21, 2012
  17. Mar 20, 2012
  18. Mar 19, 2012
  19. Mar 15, 2012
Loading