Skip to content
  1. Dec 09, 2010
  2. Nov 23, 2010
  3. Nov 10, 2010
  4. Nov 01, 2010
  5. Aug 28, 2010
    • Chris Lattner's avatar
      optimize bitcasts from large integers to vector into vector · dd660104
      Chris Lattner authored
      element insertion from the pieces that feed into the vector.
      This handles a pattern that occurs frequently due to code
      generated for the x86-64 abi.  We now compile something like
      this:
      
      struct S { float A, B, C, D; };
      struct S g;
      struct S bar() { 
        struct S A = g;
        ++A.A;
        ++A.C;
        return A;
      }
      
      into all nice vector operations:
      
      _bar:                                   ## @bar
      ## BB#0:                                ## %entry
      	movq	_g@GOTPCREL(%rip), %rax
      	movss	LCPI1_0(%rip), %xmm1
      	movss	(%rax), %xmm0
      	addss	%xmm1, %xmm0
      	pshufd	$16, %xmm0, %xmm0
      	movss	4(%rax), %xmm2
      	movss	12(%rax), %xmm3
      	pshufd	$16, %xmm2, %xmm2
      	unpcklps	%xmm2, %xmm0
      	addss	8(%rax), %xmm1
      	pshufd	$16, %xmm1, %xmm1
      	pshufd	$16, %xmm3, %xmm2
      	unpcklps	%xmm2, %xmm1
      	ret
      
      instead of icky integer operations:
      
      _bar:                                   ## @bar
      	movq	_g@GOTPCREL(%rip), %rax
      	movss	LCPI1_0(%rip), %xmm1
      	movss	(%rax), %xmm0
      	addss	%xmm1, %xmm0
      	movd	%xmm0, %ecx
      	movl	4(%rax), %edx
      	movl	12(%rax), %esi
      	shlq	$32, %rdx
      	addq	%rcx, %rdx
      	movd	%rdx, %xmm0
      	addss	8(%rax), %xmm1
      	movd	%xmm1, %eax
      	shlq	$32, %rsi
      	addq	%rax, %rsi
      	movd	%rsi, %xmm1
      	ret
      
      This resolves rdar://8360454
      
      llvm-svn: 112343
      dd660104
    • Chris Lattner's avatar
      Enhance the shift propagator to handle the case when you have: · 6c1395f6
      Chris Lattner authored
      A = shl x, 42
      ...
      B = lshr ..., 38
      
      which can be transformed into:
      A = shl x, 4
      ...
      
      iff we can prove that the would-be-shifted-in bits
      are already zero.  This eliminates two shifts in the testcase
      and allows eliminate of the whole i128 chain in the real example.
      
      llvm-svn: 112314
      6c1395f6
    • Chris Lattner's avatar
      Implement a pretty general logical shift propagation · 18d7fc8f
      Chris Lattner authored
      framework, which is good at ripping through bitfield
      operations.  This generalize a bunch of the existing
      xforms that instcombine does, such as 
        (x << c) >> c -> and
      to handle intermediate logical nodes.  This is useful for
      ripping up the "promote to large integer" code produced by
      SRoA.
      
      llvm-svn: 112304
      18d7fc8f
  6. Aug 27, 2010
  7. Jun 24, 2010
  8. Apr 17, 2010
  9. Apr 16, 2010
  10. Apr 15, 2010
  11. Jan 24, 2010
  12. Jan 23, 2010
  13. Jan 18, 2010
  14. Jan 10, 2010
  15. Jan 08, 2010
  16. Jan 05, 2010
Loading