Chris Lattner 
							
						 
					 
					
						
						
							
						
						ed36b2f1c2 
					 
					
						
						
							
							Silence a warning produced in assertions-disabled mode  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29108  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-11 18:31:26 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Owen Anderson 
							
						 
					 
					
						
						
							
						
						b64ab8769e 
					 
					
						
						
							
							Add a comment, and fix a typo that broke the build.  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29094  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-10 22:15:25 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Owen Anderson 
							
						 
					 
					
						
						
							
						
						7e05714a10 
					 
					
						
						
							
							Don't indent the entire function.  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29093  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-10 22:03:18 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						6423d4c64a 
					 
					
						
						
							
							Recognize 16-bit bswaps by relaxing overconstrained pattern.  
						
						 
						
						... 
						
						
						
						This implements Transforms/InstCombine/bswap.ll:test[34].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29087  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-10 20:25:24 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Owen Anderson 
							
						 
					 
					
						
						
							
						
						d1b78a12ef 
					 
					
						
						
							
							Make instcombine not remove Phi nodes when LCSSA is live.  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29083  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-10 19:03:49 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						f4b546110c 
					 
					
						
						
							
							Shrink libllvmgcc.dylib by another 23K  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28972  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-06-28 22:08:15 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						d228018396 
					 
					
						
						
							
							Fix Transforms/InstCombine/2006-06-28-infloop.ll  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28961  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-06-28 17:34:50 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Andrew Lenharth 
							
						 
					 
					
						
						
							
						
						b8e604c29a 
					 
					
						
						
							
							Catch more function pointer casting problems  
						
						 
						
						... 
						
						
						
						Remove the Function pointer cast in these calls, converting it to
a cast of argument.
%tmp60 = tail call int cast (int (ulong)* %str to int (int)*)( int 10 )
%tmp60 = tail call int cast (int (ulong)* %str to int (int)*)( uint %tmp51 )
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28953  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-06-28 01:01:52 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						afe91a5f26 
					 
					
						
						
							
							Implement Transforms/InstCombine/bswap.ll, turning common shift/and/or bswap  
						
						 
						
						... 
						
						
						
						idioms into bswap intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28803  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-06-15 19:07:26 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						18a4af2ba6 
					 
					
						
						
							
							Fix a bug in a recent patch.  This fixes UnitTests/Vector/Altivec/casts.c on  
						
						 
						
						... 
						
						
						
						PPC/altivec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28698  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-06-06 22:26:02 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						13d4ab4009 
					 
					
						
						
							
							Swap the order of operands created here.  For +&|^, the order doesn't matter,  
						
						 
						
						... 
						
						
						
						but for sub, it really does!  Fix fixes a miscompilation of fibheap_cut in
llvmgcc4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28600  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-31 21:14:00 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						b4db97ffa7 
					 
					
						
						
							
							Implement Transforms/InstCombine/store.ll:test2.  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28503  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-26 19:19:20 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						7b2e2792d6 
					 
					
						
						
							
							Transform things like (splat(splat)) -> splat  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28490  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-26 00:29:06 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						863bcff183 
					 
					
						
						
							
							Introduce a helper function that simplifies interpretation of shuffle masks.  
						
						 
						
						... 
						
						
						
						No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28489  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-25 23:48:38 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						01575b7315 
					 
					
						
						
							
							Turn (cast (shuffle (cast)) -> shuffle (cast) if it reduces the # casts in  
						
						 
						
						... 
						
						
						
						the program.  This exposes more opportunities for the instcombiner, and implements
vec_shuffle.ll:test6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28487  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-25 23:24:33 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						73fa49d697 
					 
					
						
						
							
							extract element from a shuffle vector can be trivially turned into an  
						
						 
						
						... 
						
						
						
						extractelement from the SV's source.  This implement vec_shuffle.ll:test[45]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28485  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-25 22:53:38 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						01859e8853 
					 
					
						
						
							
							Silence a bogus gcc warning  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28422  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-20 23:14:03 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						3e246dd084 
					 
					
						
						
							
							Backing out last check-in for now. It's causing an infinite loop gccas lencode.  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28284  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-14 06:46:03 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						033aaaf451 
					 
					
						
						
							
							Add/Sub/Mul are safe to promote here as well.  Incrementing a single-bit  
						
						 
						
						... 
						
						
						
						bitfield now gives this code:
_plus:
        lwz r2, 0(r3)
        rlwimi r2, r2, 0, 1, 31
        xoris r2, r2, 32768
        stw r2, 0(r3)
        blr
instead of this:
_plus:
        lwz r2, 0(r3)
        srwi r4, r2, 31
        slwi r4, r4, 31
        addis r4, r4, -32768
        rlwimi r2, r4, 0, 0, 0
        stw r2, 0(r3)
        blr
this can obviously still be improved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28275  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-13 02:16:08 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						70074e00a2 
					 
					
						
						
							
							Implement simple promotion for cast elimination in instcombine.  This is  
						
						 
						
						... 
						
						
						
						currently very limited, but can be extended in the future.  For example,
we now compile:
uint %test30(uint %c1) {
        %c2 = cast uint %c1 to ubyte
        %c3 = xor ubyte %c2, 1
        %c4 = cast ubyte %c3 to uint
        ret uint %c4
}
to:
_xor:
        movzbl 4(%esp), %eax
        xorl $1, %eax
        ret
instead of:
_xor:
        movb $1, %al
        xorb 4(%esp), %al
        movzbl %al, %eax
        ret
More impressively, we now compile:
struct B { unsigned bit : 1; };
void xor(struct B *b) { b->bit = b->bit ^ 1; }
To (X86/PPC):
_xor:
        movl 4(%esp), %eax
        xorl $-2147483648, (%eax)
        ret
_xor:
        lwz r2, 0(r3)
        xoris r2, r2, 32768
        stw r2, 0(r3)
        blr
instead of (X86/PPC):
_xor:
        movl 4(%esp), %eax
        movl (%eax), %ecx
        movl %ecx, %edx
        shrl $31, %edx
        # TRUNCATE movb %dl, %dl
        xorb $1, %dl
        movzbl %dl, %edx
        andl $2147483647, %ecx
        shll $31, %edx
        orl %ecx, %edx
        movl %edx, (%eax)
        ret
_xor:
        lwz r2, 0(r3)
        srwi r4, r2, 31
        xori r4, r4, 1
        rlwimi r2, r4, 31, 0, 0
        stw r2, 0(r3)
        blr
This implements InstCombine/cast.ll:test30.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28273  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-13 02:06:03 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						8c8c66a8cd 
					 
					
						
						
							
							Refactor some code, making it simpler.  
						
						 
						
						... 
						
						
						
						When doing the initial pass of constant folding, if we get a constantexpr,
simplify the constant expr like we would do if the constant is folded in the
normal loop.
This fixes the missed-optimization regression in
Transforms/InstCombine/getelementptr.ll last night.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28224  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-11 17:11:52 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						f4f5a77fdc 
					 
					
						
						
							
							Two changes:  
						
						 
						
						... 
						
						
						
						1. Implement InstCombine/deadcode.ll by not adding instructions in unreachable
   blocks (due to constants in conditional branches/switches) to the worklist.
   This causes them to be deleted before instcombine starts up, leading to
   better optimization.
2. In the prepass over instructions, do trivial constprop/dce as we go.  This
   has the effect of improving the effectiveness of #1 .  In addition, it
   *significantly* speeds up instcombine on test cases with large amounts of
   constant folding code (for example, that produced by code specialization
   or partial evaluation).  In one example, it speeds up instcombine from
   0.0589s to 0.0224s with a release build (a 2.6x speedup).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28215  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-10 19:00:36 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						33a6113995 
					 
					
						
						
							
							Move some code around.  
						
						 
						
						... 
						
						
						
						Make the "fold (and (cast A), (cast B)) -> (cast (and A, B))" transformation
only apply when both casts really will cause code to be generated.  If one or
both doesn't, then this xform doesn't remove a cast.
This fixes Transforms/InstCombine/2006-05-06-Infloop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28141  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-06 09:00:16 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						581a7ad7c9 
					 
					
						
						
							
							Fix an infinite loop compiling oggenc last night.  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28128  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 20:51:30 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						6fc205fc44 
					 
					
						
						
							
							Implement InstCombine/cast.ll:test29  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28126  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 06:39:07 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						e3158308e0 
					 
					
						
						
							
							Fix Transforms/InstCombine/2006-05-04-DemandedBitCrash.ll  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28101  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-04 17:33:35 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						94046b4d10 
					 
					
						
						
							
							Fix InstCombine/2006-04-28-ShiftShiftLongLong.ll  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28019  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-28 22:21:41 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						d929f06f4d 
					 
					
						
						
							
							Add support for inserting undef into a vector.  This implements  
						
						 
						
						... 
						
						
						
						Transforms/InstCombine/vec_insert_to_shuffle.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27997  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-27 21:14:21 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Andrew Lenharth 
							
						 
					 
					
						
						
							
						
						7a31b975fb 
					 
					
						
						
							
							Make code match cvs commit message :)  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27881  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-20 15:41:37 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Andrew Lenharth 
							
						 
					 
					
						
						
							
						
						8117f9a40e 
					 
					
						
						
							
							If we can convert the return pointer type into an integer that IntPtrType  
						
						 
						
						... 
						
						
						
						can be converted to losslessly, we can continue the conversion to a direct call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27880  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-20 14:56:47 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						fd6bdf0b0f 
					 
					
						
						
							
							Turn x86 unaligned load/store intrinsics into aligned load/store instructions  
						
						 
						
						... 
						
						
						
						if the pointer is known aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27781  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-17 22:26:56 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						7f6cc0ccb5 
					 
					
						
						
							
							Fix a bug in the 'shuffle(undef,x,mask) -> shuffle(x, undef,mask')' xform  
						
						 
						
						... 
						
						
						
						Make the insert/extract elt -> shuffle code more aggressive.
This fixes CodeGen/PowerPC/vec_shuffle.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27728  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-16 00:51:47 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						706126dac1 
					 
					
						
						
							
							Canonicalize shuffle(undef,x,mask) -> shuffle(x, undef,mask').  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27727  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-16 00:03:56 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						efb47359ff 
					 
					
						
						
							
							significant cleanups to code that uses insert/extractelt heavily.  This builds  
						
						 
						
						... 
						
						
						
						maximal shuffles out of them where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27717  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-15 01:39:45 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						9fb9213083 
					 
					
						
						
							
							Turn casts into getelementptr's when possible.  This enables SROA to be more  
						
						 
						
						... 
						
						
						
						aggressive in some cases where LLVMGCC 4 is inserting casts for no reason.
This implements InstCombine/cast.ll:test27/28.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27620  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-12 18:09:35 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						389a6f58f7 
					 
					
						
						
							
							Implement vec_shuffle.ll:test3  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27573  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-10 23:06:36 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						a844fc4cb0 
					 
					
						
						
							
							Implement InstCombine/vec_shuffle.ll:test[12]  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27571  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-10 22:45:52 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						e2ed057562 
					 
					
						
						
							
							Lower vperm(x,y, mask) -> shuffle(x,y,mask) if mask is constant.  This allows  
						
						 
						
						... 
						
						
						
						us to compile oh-so-realistic stuff like this:
 vec_vperm(A, B, (vector unsigned char){14});
to:
        vspltb v0, v0, 14
instead of:
        vspltisb v0, 14
        vperm v0, v2, v1, v0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27452  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-06 19:19:17 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						4132afb0d2 
					 
					
						
						
							
							vector casts of casts are eliminable.  Transform this:  
						
						 
						
						... 
						
						
						
						%tmp = cast <4 x uint> %tmp to <4 x int>                ; <<4 x int>> [#uses=1]
        %tmp = cast <4 x int> %tmp to <4 x float>               ; <<4 x float>> [#uses=1]
into:
        %tmp = cast <4 x uint> %tmp to <4 x float>              ; <<4 x float>> [#uses=1]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27355  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-02 05:43:13 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						a1c3538537 
					 
					
						
						
							
							Allow transforming this:  
						
						 
						
						... 
						
						
						
						%tmp = cast <4 x uint>* %testData to <4 x int>*         ; <<4 x int>*> [#uses=1]
        %tmp = load <4 x int>* %tmp             ; <<4 x int>> [#uses=1]
to this:
        %tmp = load <4 x uint>* %testData               ; <<4 x uint>> [#uses=1]
        %tmp = cast <4 x uint> %tmp to <4 x int>                ; <<4 x int>> [#uses=1]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27353  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-02 05:37:12 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						82ed58f9c4 
					 
					
						
						
							
							Turn altivec lvx/stvx intrinsics into loads and stores.  This allows the  
						
						 
						
						... 
						
						
						
						elimination of one load from this:
int AreSecondAndThirdElementsBothNegative( vector float *in ) {
#define QNaN 0x7FC00000
const vector unsigned int testData = (vector unsigned int)( QNaN, 0, 0, QNaN );
vector float test = vec_ld( 0, (float*) &testData );
return ! vec_any_ge( test, *in );
}
Now generating:
_AreSecondAndThirdElementsBothNegative:
        mfspr r2, 256
        oris r4, r2, 49152
        mtspr 256, r4
        li r4, lo16(LCPI1_0)
        lis r5, ha16(LCPI1_0)
        addi r6, r1, -16
        lvx v0, r5, r4
        stvx v0, 0, r6
        lvx v1, 0, r3
        vcmpgefp. v0, v0, v1
        mfcr r3, 2
        rlwinm r3, r3, 27, 31, 31
        xori r3, r3, 1
        cntlzw r3, r3
        srwi r3, r3, 5
        mtspr 256, r2
        blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27352  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-02 05:30:25 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						ae1ab3989c 
					 
					
						
						
							
							Fix InstCombine/2006-04-01-InfLoop.ll  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27330  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-01 22:05:01 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						64daab56c2 
					 
					
						
						
							
							Fold A^(B&A) -> (B&A)^A  
						
						 
						
						... 
						
						
						
						Fold (B&A)^A == ~B & A
This implements InstCombine/xor.ll:test2[56]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27328  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-04-01 08:03:55 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						6e6b0da303 
					 
					
						
						
							
							If we can look through vector operations to find the scalar version of an  
						
						 
						
						... 
						
						
						
						extract_element'd value, do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27323  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-31 23:01:56 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						1f13c88939 
					 
					
						
						
							
							extractelement(undef,x) -> undef  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27300  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-31 18:25:14 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						df084ff78b 
					 
					
						
						
							
							Fix Transforms/InstCombine/2006-03-30-ExtractElement.ll  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27261  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-30 22:02:40 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						98509ef3c7 
					 
					
						
						
							
							Don't crash on packed logical ops  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27125  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-25 21:58:26 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						930ac0606c 
					 
					
						
						
							
							Can't combine anymore - we don't have a chain through llvm.dbg intrinsics.  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26992  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-23 18:10:42 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						51c26e911a 
					 
					
						
						
							
							Teach the alignment handling code to look through constant expr casts and GEPs  
						
						 
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26580  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-07 01:28:57 +00:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						95a959dc1a 
					 
					
						
						
							
							Teach instcombine to increase the alignment of memset/memcpy/memmove when  
						
						 
						
						... 
						
						
						
						the pointer is known to come from either a global variable, alloca or
malloc.  This allows us to compile this:
  P = malloc(28);
  memset(P, 0, 28);
into explicit stores on PPC instead of a memset call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26577  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-06 20:18:44 +00:00