Skip to content
  1. Apr 10, 2012
  2. Apr 09, 2012
    • Akira Hatanaka's avatar
      Have TargetLowering::getPICJumpTableRelocBase return a node that points to the · 8483a6c4
      Akira Hatanaka authored
      GOT if jump table uses 64-bit gp-relative relocation.
      
      llvm-svn: 154341
      8483a6c4
    • Chad Rosier's avatar
      When performing a truncating store, it's possible to rearrange the data · e0e38f61
      Chad Rosier authored
      in-register, such that we can use a single vector store rather then a 
      series of scalar stores.
      
      For func_4_8 the generated code
      
      	vldr	d16, LCPI0_0
      	vmov	d17, r0, r1
      	vadd.i16	d16, d17, d16
      	vmov.u16	r0, d16[3]
      	strb	r0, [r2, #3]
      	vmov.u16	r0, d16[2]
      	strb	r0, [r2, #2]
      	vmov.u16	r0, d16[1]
      	strb	r0, [r2, #1]
      	vmov.u16	r0, d16[0]
      	strb	r0, [r2]
      	bx	lr
      
      becomes
      
      	vldr	d16, LCPI0_0
      	vmov	d17, r0, r1
      	vadd.i16	d16, d17, d16
      	vuzp.8	d16, d17
      	vst1.32	{d16[0]}, [r2, :32]
      	bx	lr
      
      I'm not fond of how this combine pessimizes 2012-03-13-DAGCombineBug.ll,
      but I couldn't think of a way to judiciously apply this combine.
      
      This
      
      	ldrh	r0, [r0, #4]
      	strh	r0, [r1]
      
      becomes
      
      	vldr	d16, [r0]
      	vmov.u16	r0, d16[2]
      	vmov.32	d16[0], r0
      	vuzp.16	d16, d17
      	vst1.32	{d16[0]}, [r1, :32]
      
      PR11158
      rdar://10703339
      
      llvm-svn: 154340
      e0e38f61
    • 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
  7. Apr 04, 2012
  8. Apr 03, 2012
  9. Apr 02, 2012
  10. Apr 01, 2012
    • Hal Finkel's avatar
      Enable prefetch generation on PPC64. · 322e41a9
      Hal Finkel authored
      llvm-svn: 153851
      322e41a9
    • 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
    • Hal Finkel's avatar
      Add instruction itinerary for the PPC64 A2 core. · 9f9f8929
      Hal Finkel authored
      This adds a full itinerary for IBM's PPC64 A2 embedded core. These
      cores form the basis for the CPUs in the new IBM BG/Q supercomputer.
      
      llvm-svn: 153842
      9f9f8929
  11. Mar 31, 2012
Loading