Jim Laskey 
							
						 
					 
					
						
						
							
						
						172585b3aa 
					 
					
						
						
							
							Can't move a load node if it's chain is not used.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30609  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-26 07:37:42 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						14fbcbfa2b 
					 
					
						
						
							
							Accidental enable of bad code  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30601  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-25 21:11:32 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						288af5e740 
					 
					
						
						
							
							Fix chain dropping in load and drop unused stores in ret blocks.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30600  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-25 19:32:58 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						279f053eae 
					 
					
						
						
							
							Core antialiasing for load and store.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30597  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-25 16:29:54 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						2adffa1f66 
					 
					
						
						
							
							Make it work for DAG combine of multi-value nodes.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30573  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-21 19:04:05 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						516b0eacff 
					 
					
						
						
							
							core corrections  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30570  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-21 17:35:47 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						d1aed7aaf7 
					 
					
						
						
							
							Basic "in frame" alias analysis.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30568  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-21 16:28:59 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						0e4b922680 
					 
					
						
						
							
							fold (aext (and (trunc x), cst)) -> (and x, cst).  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30561  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-21 06:40:43 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						bf3708794f 
					 
					
						
						
							
							Check the right value type.  This fixes 186.crafty on x86  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30560  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-21 06:17:39 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						111c228241 
					 
					
						
						
							
							Compile:  
						
						... 
						
						
						
						int %test(ulong *%tmp) {
        %tmp = load ulong* %tmp         ; <ulong> [#uses=1]
        %tmp.mask = shr ulong %tmp, ubyte 50            ; <ulong> [#uses=1]
        %tmp.mask = cast ulong %tmp.mask to ubyte
        %tmp2 = and ubyte %tmp.mask, 3          ; <ubyte> [#uses=1]
        %tmp2 = cast ubyte %tmp2 to int         ; <int> [#uses=1]
        ret int %tmp2
}
to:
_test:
        movl 4(%esp), %eax
        movl 4(%eax), %eax
        shrl $18, %eax
        andl $3, %eax
        ret
instead of:
_test:
        movl 4(%esp), %eax
        movl 4(%eax), %eax
        shrl $18, %eax
        # TRUNCATE movb %al, %al
        andb $3, %al
        movzbl %al, %eax
        ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30558  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-21 06:14:31 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						6007b84a5b 
					 
					
						
						
							
							Generalize (zext (truncate x)) and (sext (truncate x)) folding to work when  
						
						... 
						
						
						
						the src/dst are not the same size.  This catches things like "truncate
32-bit X to 8 bits, then zext to 16", which happens a bit on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30557  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-21 06:00:20 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						e3152e54b5 
					 
					
						
						
							
							Compile:  
						
						... 
						
						
						
						int test3(int a, int b) { return (a < 0) ? a : 0; }
to:
_test3:
        srawi r2, r3, 31
        and r3, r2, r3
        blr
instead of:
_test3:
        cmpwi cr0, r3, 1
        li r2, 0
        blt cr0, LBB2_2 ;entry
LBB2_1: ;entry
        mr r3, r2
LBB2_2: ;entry
        blr
This implements: PowerPC/select_lt0.ll:seli32_a_a
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30517  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-20 06:41:35 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						84750587bf 
					 
					
						
						
							
							Fold the full generality of (any_extend (truncate x))  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30514  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-20 06:29:17 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						5f42a240ba 
					 
					
						
						
							
							Two things:  
						
						... 
						
						
						
						1. teach SimplifySetCC that '(srl (ctlz x), 5) == 0' is really x != 0.
2. Teach visitSELECT_CC to use SimplifySetCC instead of calling it and
   ignoring the result.  This allows us to compile:
bool %test(ulong %x) {
  %tmp = setlt ulong %x, 4294967296
  ret bool %tmp
}
to:
_test:
        cntlzw r2, r3
        cmplwi cr0, r3, 1
        srwi r2, r2, 5
        li r3, 0
        beq cr0, LBB1_2 ;
LBB1_1: ;
        mr r3, r2
LBB1_2: ;
        blr
instead of:
_test:
        addi r2, r3, -1
        cntlzw r2, r2
        cntlzw r3, r3
        srwi r2, r2, 5
        cmplwi cr0, r2, 0
        srwi r2, r3, 5
        li r3, 0
        bne cr0, LBB1_2 ;
LBB1_1: ;
        mr r3, r2
LBB1_2: ;
        blr
This isn't wonderful, but it's an improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30513  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-20 06:19:26 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						1ec72738ac 
					 
					
						
						
							
							Fold (X & C1) | (Y & C2)  -> (X|Y) & C3 when possible.  
						
						... 
						
						
						
						This implements CodeGen/X86/and-or-fold.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30379  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-14 21:11:37 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						516b962b5a 
					 
					
						
						
							
							Split rotate matching code out to its own function.  Make it stronger, by  
						
						... 
						
						
						
						matching things like ((x >> c1) & c2) | ((x << c3) & c4) to (rot x, c5) & c6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30376  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-09-14 20:50:57 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						dfcfacb0cb 
					 
					
						
						
							
							DAG combiner fix for rotates. Previously the outer-most condition checks  
						
						... 
						
						
						
						for ROTL availability. This prevents it from forming ROTR for targets that
has ROTR only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29997  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-08-31 07:41:12 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						1efba0ecb4 
					 
					
						
						
							
							Move isCommutativeBinOp from SelectionDAG.cpp and DAGCombiner.cpp out. Make it a static method of SelectionDAG.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29951  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-08-29 06:42:35 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						a4f0b3a084 
					 
					
						
						
							
							s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-08-27 12:54:02 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						3577e38c2b 
					 
					
						
						
							
							change internal impl of dag combiner so that calls to CombineTo never have to  
						
						... 
						
						
						
						make a temporary vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29618  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-08-11 17:56:38 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						b9ea4a39b8 
					 
					
						
						
							
							Change one ReplaceAllUsesWith method to take an array of operands to replace  
						
						... 
						
						
						
						instead of a vector of operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29616  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-08-11 17:46:28 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						bd564bfc63 
					 
					
						
						
							
							Start eliminating temporary vectors used to create DAG nodes.  Instead, pass  
						
						... 
						
						
						
						in the start of an array and a count of operands where applicable.  In many
cases, the number of operands is known, so this static array can be allocated
on the stack, avoiding the heap.  In many other cases, a SmallVector can be
used, which has the same benefit in the common cases.
I updated a lot of code calling getNode that takes a vector, but ran out of
time.  The rest of the code should be updated, and these methods should be
removed.
We should also do the same thing to eliminate the methods that take a
vector of MVT::ValueTypes.
It would be extra nice to convert the dagiselemitter to avoid creating vectors
for operands when calling getTargetNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29566  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-08-08 02:23:42 +00:00 
						 
				 
			
				
					
						
							
							
								Reid Spencer 
							
						 
					 
					
						
						
							
						
						9160a6a18f 
					 
					
						
						
							
							Initialize some variables the compiler warns about.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29277  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-25 20:44:41 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						917ec983df 
					 
					
						
						
							
							If a shuffle is a splat, check if the argument is a build_vector with all elements being the same. If so, return the argument.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29242  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-21 08:25:53 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						e7bec0dbb5 
					 
					
						
						
							
							If a shuffle is unary, i.e. one of the vector argument is not needed, turn the  
						
						... 
						
						
						
						operand into a undef and adjust mask accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29232  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-20 22:44:41 +00:00 
						 
				 
			
				
					
						
							
							
								Andrew Lenharth 
							
						 
					 
					
						
						
							
						
						ae6153f943 
					 
					
						
						
							
							80 cols  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29221  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-20 17:43:27 +00:00 
						 
				 
			
				
					
						
							
							
								Andrew Lenharth 
							
						 
					 
					
						
						
							
						
						ed41f1bb19 
					 
					
						
						
							
							Reduce number of exported symbols  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29220  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-07-20 17:28:38 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						360e8200ec 
					 
					
						
						
							
							Mark these two classes as hidden, shrinking libllbmgcc.dylib by 25K  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28970  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-06-28 21:58:30 +00:00 
						 
				 
			
				
					
						
							
							
								Andrew Lenharth 
							
						 
					 
					
						
						
							
						
						232c910b8a 
					 
					
						
						
							
							Start on my todo list  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28752  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-06-12 16:07:18 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						7b336a8746 
					 
					
						
						
							
							visitVBinOp: Can't fold divide by zero!  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28584  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-31 06:08:35 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						729c6d1da8 
					 
					
						
						
							
							Fix a nasty dag combiner bug that caused nondeterminstic crashes (MY FAVORITE!):  
						
						... 
						
						
						
						SimplifySelectOps would eliminate a Select, delete it, then return true.
The clients would see that it did something and return null.
The top level would see a null return, and decide that nothing happened,
proceeding to process the node in other ways: boom.
The fix is simple: clients of SimplifySelectOps should return the select
node itself.
In order to catch really obnoxious boogs like this in the future, add an
assert that nodes are not deleted.  We do this by checking for a sentry node
type that the SDNode dtor sets when a node is destroyed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28514  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-27 00:43:02 +00:00 
						 
				 
			
				
					
						
							
							
								Andrew Lenharth 
							
						 
					 
					
						
						
							
						
						dae9cbe8d4 
					 
					
						
						
							
							Move this code to a common place  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28329  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-16 17:42:15 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						5eed34d208 
					 
					
						
						
							
							Comment out dead variables  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28252  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-12 17:57:54 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						21a57dc751 
					 
					
						
						
							
							Two simplifications for token factor nodes: simplify tf(x,x) -> x.  
						
						... 
						
						
						
						simplify tf(x,y,y,z) -> tf(x,y,z).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28233  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-12 05:01:37 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						60e8c71c9f 
					 
					
						
						
							
							Debugging info  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28200  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-09 06:55:15 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						4b37e87ab9 
					 
					
						
						
							
							Make the case I just checked in stronger.  Now we compile this:  
						
						... 
						
						
						
						short test2(short X, short x) {
  int Y = (short)(X+x);
  return Y >> 1;
}
to:
_test2:
        add r2, r3, r4
        extsh r2, r2
        srawi r3, r2, 1
        blr
instead of:
_test2:
        add r2, r3, r4
        extsh r2, r2
        srwi r2, r2, 1
        extsh r3, r2
        blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28175  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-08 21:18:59 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						eaeda56649 
					 
					
						
						
							
							Implement and_sext.ll:test3, generating:  
						
						... 
						
						
						
						_test4:
        srawi r3, r3, 16
        blr
instead of:
_test4:
        srwi r2, r3, 16
        extsh r3, r2
        blr
for:
short test4(unsigned X) {
  return (X >> 16);
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28174  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-08 20:59:41 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						a850446a0b 
					 
					
						
						
							
							Compile this:  
						
						... 
						
						
						
						short test4(unsigned X) {
  return (X >> 16);
}
to:
_test4:
        movl 4(%esp), %eax
        sarl $16, %eax
        ret
instead of:
_test4:
        movl $-65536, %eax
        andl 4(%esp), %eax
        sarl $16, %eax
        ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28171  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-08 20:51:54 +00:00 
						 
				 
			
				
					
						
							
							
								Nate Begeman 
							
						 
					 
					
						
						
							
						
						5c742681ed 
					 
					
						
						
							
							Fix PR772  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28161  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-08 01:35:01 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						310b578023 
					 
					
						
						
							
							Simplify some code, add a couple minor missed folds  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28152  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-06 23:06:26 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						541a24f7af 
					 
					
						
						
							
							remove cases handled elsewhere  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28150  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-06 22:43:44 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						ee4ea92358 
					 
					
						
						
							
							Use the new TargetLowering::ComputeNumSignBits method to eliminate  
						
						... 
						
						
						
						sign_extend_inreg operations.  Though ComputeNumSignBits is still rudimentary,
this is enough to compile this:
short test(short X, short x) {
  int Y = X+x;
  return (Y >> 1);
}
short test2(short X, short x) {
  int Y = (short)(X+x);
  return Y >> 1;
}
into:
_test:
        add r2, r3, r4
        srawi r3, r2, 1
        blr
_test2:
        add r2, r3, r4
        extsh r2, r2
        srawi r3, r2, 1
        blr
instead of:
_test:
        add r2, r3, r4
        srawi r2, r2, 1
        extsh r3, r2
        blr
_test2:
        add r2, r3, r4
        extsh r2, r2
        srawi r2, r2, 1
        extsh r3, r2
        blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28146  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-06 09:30:03 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						b72773bb88 
					 
					
						
						
							
							Fold trunc(any_ext).  This gives stuff like:  
						
						... 
						
						
						
						27,28c27
<       movzwl %di, %edi
<       movl %edi, %ebx
---
>       movw %di, %bx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28137  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 22:56:26 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						06afe07037 
					 
					
						
						
							
							Shrink shifts when possible.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28136  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 22:53:17 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						e564dbb51c 
					 
					
						
						
							
							Fold (fpext (load x)) -> (extload x)  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28130  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 21:34:35 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						0d8dae749c 
					 
					
						
						
							
							Fold some common code.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28124  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 06:32:04 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						540121f1ec 
					 
					
						
						
							
							Implement:  
						
						... 
						
						
						
						// fold (and (sext x), (sext y)) -> (sext (and x, y))
  // fold (or  (sext x), (sext y)) -> (sext (or  x, y))
  // fold (xor (sext x), (sext y)) -> (sext (xor x, y))
  // fold (and (aext x), (aext y)) -> (aext (and x, y))
  // fold (or  (aext x), (aext y)) -> (aext (or  x, y))
  // fold (xor (aext x), (aext y)) -> (aext (xor x, y))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28123  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 06:31:05 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						a3dc3f692c 
					 
					
						
						
							
							Pull and through and/or/xor.  This compiles some bitfield code to:  
						
						... 
						
						
						
						mov EAX, DWORD PTR [ESP + 4]
        mov ECX, DWORD PTR [EAX]
        mov EDX, ECX
        add EDX, EDX
        or EDX, ECX
        and EDX, -2147483648
        and ECX, 2147483647
        or EDX, ECX
        mov DWORD PTR [EAX], EDX
        ret
instead of:
        sub ESP, 4
        mov DWORD PTR [ESP], ESI
        mov EAX, DWORD PTR [ESP + 8]
        mov ECX, DWORD PTR [EAX]
        mov EDX, ECX
        add EDX, EDX
        mov ESI, ECX
        and ESI, -2147483648
        and EDX, -2147483648
        or EDX, ESI
        and ECX, 2147483647
        or EDX, ECX
        mov DWORD PTR [EAX], EDX
        mov ESI, DWORD PTR [ESP]
        add ESP, 4
        ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28122  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 06:10:43 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						5ffc066912 
					 
					
						
						
							
							Implement a variety of simplifications for ANY_EXTEND.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28121  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 05:58:59 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						35e5c14b80 
					 
					
						
						
							
							Factor some code, add these transformations:  
						
						... 
						
						
						
						// fold (and (trunc x), (trunc y)) -> (trunc (and x, y))
  // fold (or  (trunc x), (trunc y)) -> (trunc (or  x, y))
  // fold (xor (trunc x), (trunc y)) -> (trunc (xor x, y))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28120  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-05-05 05:51:50 +00:00