Skip to content
  1. Feb 12, 2009
  2. Feb 11, 2009
  3. Feb 10, 2009
  4. Feb 09, 2009
  5. Feb 08, 2009
  6. Feb 07, 2009
  7. Feb 06, 2009
  8. Feb 05, 2009
  9. Feb 03, 2009
  10. Feb 02, 2009
  11. Jan 31, 2009
    • Nick Lewycky's avatar
      Reinstate this optimization to fold icmp of xor when possible. Don't try to · f2390815
      Nick Lewycky authored
      turn icmp eq a+x, b+x into icmp eq a, b if a+x or b+x has other uses. This
      may have been increasing register pressure leading to the bzip2 slowdown.
      
      llvm-svn: 63487
      f2390815
    • Chris Lattner's avatar
      Fix PR3452 (an infinite loop bootstrapping) by disabling the recent · 9e2b9f32
      Chris Lattner authored
      improvements to the EvaluateInDifferentType code.  This code works 
      by just inserted a bunch of new code and then seeing if it is 
      useful.  Instcombine is not allowed to do this: it can only insert
      new code if it is useful, and only when it is converging to a more
      canonical fixed point.  Now that we iterate when DCE makes progress,
      this causes an infinite loop when the code ends up not being used.
      
      llvm-svn: 63483
      9e2b9f32
    • Chris Lattner's avatar
      now that all the pieces are in place, teach instcombine's · 76a63ed0
      Chris Lattner authored
      simplifydemandedbits to simplify instructions with *multiple
      uses* in contexts where it can get away with it.  This allows
      it to simplify the code in multi-use-or.ll into a single 'add 
      double'.
      
      This change is particularly interesting because it will cover
      up for some common codegen bugs with large integers created due
      to the recent SROA patch.  When working on fixing those bugs,
      this should be disabled.
      
      llvm-svn: 63481
      76a63ed0
    • Chris Lattner's avatar
      3e2cb66c
    • Chris Lattner's avatar
      make some fairly meaty internal changes to how SimplifyDemandedBits works. · 83c6a141
      Chris Lattner authored
      Now, if it detects that "V" is the same as some other value, 
      SimplifyDemandedBits returns the new value instead of RAUW'ing it immediately.
      This has two benefits:
      1) simpler code in the recursive SimplifyDemandedBits routine.
      2) it allows future fun stuff in instcombine where an operation has multiple
         uses and can be simplified in one context, but not all.
      
      #2 isn't implemented yet, this patch should have no functionality change.
      
      llvm-svn: 63479
      83c6a141
    • Chris Lattner's avatar
      minor cleanups · 585cfb2c
      Chris Lattner authored
      llvm-svn: 63477
      585cfb2c
    • Chris Lattner's avatar
      make sure to set Changed=true when instcombine hacks on the code, · 94cfb281
      Chris Lattner authored
      not doing so prevents it from properly iterating and prevents it
      from deleting the entire body of dce-iterate.ll
      
      llvm-svn: 63476
      94cfb281
    • Chris Lattner's avatar
      Simplify and generalize the SROA "convert to scalar" transformation to · ec99c46d
      Chris Lattner authored
      be able to handle *ANY* alloca that is poked by loads and stores of 
      bitcasts and GEPs with constant offsets.  Before the code had a number
      of annoying limitations and caused it to miss cases such as storing into
      holes in structs and complex casts (as in bitfield-sroa) where we had
      unions of bitfields etc.  This also handles a number of important cases
      that are exposed due to the ABI lowering stuff we do to pass stuff by
      value.
      
      One case that is pretty great is that we compile 
      2006-11-07-InvalidArrayPromote.ll into:
      
      define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind {
      	%tmp10 = call <4 x i32> @llvm.x86.sse2.cvttps2dq(<4 x float> %v1)
      	%tmp105 = bitcast <4 x i32> %tmp10 to i128
      	%tmp1056 = zext i128 %tmp105 to i256	
      	%tmp.upgrd.43 = lshr i256 %tmp1056, 96
      	%tmp.upgrd.44 = trunc i256 %tmp.upgrd.43 to i32	
      	ret i32 %tmp.upgrd.44
      }
      
      which turns into:
      
      _func:
      	subl	$28, %esp
      	cvttps2dq	%xmm1, %xmm0
      	movaps	%xmm0, (%esp)
      	movl	12(%esp), %eax
      	addl	$28, %esp
      	ret
      
      Which is pretty good code all things considering :).
      
      One effect of this is that SROA will start generating arbitrary bitwidth 
      integers that are a multiple of 8 bits.  In the case above, we got a 
      256 bit integer, but the codegen guys assure me that it can handle the 
      simple and/or/shift/zext stuff that we're doing on these operations.
      
      This addresses rdar://6532315
      
      llvm-svn: 63469
      ec99c46d
Loading