llvm/test/Transforms
Chris Lattner 3d28b1b35b Teach instcombine 4 new xforms:
(add (sext x), cst) --> (sext (add x, cst'))
  (add (sext x), (sext y)) --> (sext (add int x, y))
  (add double (sitofp x), fpcst) --> (sitofp (add int x, intcst))
  (add double (sitofp x), (sitofp y)) --> (sitofp (add int x, y))

This generally reduces conversions.  For example MiBench/telecomm-gsm
gets these simplifications:

HACK2: 	%tmp67.i142.i.i = sext i16 %tmp6.i141.i.i to i32		; <i32> [#uses=1]
	%tmp23.i139.i.i = sext i16 %tmp2.i138.i.i to i32		; <i32> [#uses=1]
	%tmp8.i143.i.i = add i32 %tmp67.i142.i.i, %tmp23.i139.i.i		; <i32> [#uses=3]
HACK2: 	%tmp67.i121.i.i = sext i16 %tmp6.i120.i.i to i32		; <i32> [#uses=1]
	%tmp23.i118.i.i = sext i16 %tmp2.i117.i.i to i32		; <i32> [#uses=1]
	%tmp8.i122.i.i = add i32 %tmp67.i121.i.i, %tmp23.i118.i.i		; <i32> [#uses=3]
HACK2: 	%tmp67.i.i190.i = sext i16 %tmp6.i.i189.i to i32		; <i32> [#uses=1]
	%tmp23.i.i187.i = sext i16 %tmp2.i.i186.i to i32		; <i32> [#uses=1]
	%tmp8.i.i191.i = add i32 %tmp67.i.i190.i, %tmp23.i.i187.i		; <i32> [#uses=3]
HACK2: 	%tmp67.i173.i.i.i = sext i16 %tmp6.i172.i.i.i to i32		; <i32> [#uses=1]
	%tmp23.i170.i.i.i = sext i16 %tmp2.i169.i.i.i to i32		; <i32> [#uses=1]
	%tmp8.i174.i.i.i = add i32 %tmp67.i173.i.i.i, %tmp23.i170.i.i.i		; <i32> [#uses=3]
HACK2: 	%tmp67.i152.i.i.i = sext i16 %tmp6.i151.i.i.i to i32		; <i32> [#uses=1]
	%tmp23.i149.i.i.i = sext i16 %tmp2.i148.i.i.i to i32		; <i32> [#uses=1]
	%tmp8.i153.i.i.i = add i32 %tmp67.i152.i.i.i, %tmp23.i149.i.i.i		; <i32> [#uses=3]
HACK2: 	%tmp67.i.i.i.i = sext i16 %tmp6.i.i.i.i to i32		; <i32> [#uses=1]
	%tmp23.i.i5.i.i = sext i16 %tmp2.i.i.i.i to i32		; <i32> [#uses=1]
	%tmp8.i.i7.i.i = add i32 %tmp67.i.i.i.i, %tmp23.i.i5.i.i		; <i32> [#uses=3]


This also fixes a bug in ComputeNumSignBits handling select and
makes it more aggressive with and/or.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51302 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-20 05:46:13 +00:00
..
ADCE Move this test from ADCE to loop deletion, where it is more appropriate. 2008-05-16 04:34:19 +00:00
ArgumentPromotion Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
BlockPlacement Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
BranchFolding Don't branch fold inline asm statements. 2007-10-19 21:09:55 +00:00
CodeExtractor Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
CondProp Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
ConstantMerge Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
ConstProp Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
DeadArgElim Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
DeadStoreElimination Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
GCSE Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
GlobalDCE Remove llvm-upgrade and update test cases. 2008-03-01 09:15:35 +00:00
GlobalOpt When SRoA'ing a global variable, make sure the new globals get the 2008-04-26 07:40:11 +00:00
GVN Add a testcase for non-local CSE of read-only calls. 2008-05-13 08:17:44 +00:00
GVNPRE For PR1553: 2007-07-19 23:13:04 +00:00
IndVarsSimplify Use loop deletion instead of ADCE for removing loops. 2008-05-16 04:27:38 +00:00
Inline Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
InstCombine Teach instcombine 4 new xforms: 2008-05-20 05:46:13 +00:00
Internalize Simplify internalize pass. Add test case. 2008-05-14 20:01:01 +00:00
IPConstantProp Handle multiple ret values. 2008-03-11 22:24:29 +00:00
JumpThreading Fix a crash when threading a block that includes a MRV call result. 2008-05-05 20:21:22 +00:00
LCSSA Byebye llvm-upgrade! 2008-03-25 04:26:08 +00:00
LICM Use loop deletion instead of ADCE in these tests. 2008-05-16 04:33:37 +00:00
LoopDeletion Move this test from ADCE to loop deletion, where it is more appropriate. 2008-05-16 04:34:19 +00:00
LoopIndexSplit Do not erase induction variable increment if it is used outside the loop. 2008-05-19 22:23:55 +00:00
LoopRotate New test for bug fixed in 50545. 2008-05-01 22:50:14 +00:00
LoopSimplify Byebye llvm-upgrade! 2008-03-25 04:26:08 +00:00
LoopStrengthReduce Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
LoopUnroll Upgrade tests. 2008-03-19 07:28:33 +00:00
LoopUnswitch Upgrade tests. 2008-03-19 07:28:33 +00:00
LowerInvoke rename *.llx -> *.ll, last batch. 2008-04-19 22:32:52 +00:00
LowerSetJmp Upgrade tests. 2008-03-19 07:28:33 +00:00
LowerSwitch Upgrade tests. 2008-03-19 07:28:33 +00:00
Mem2Reg Upgrade tests. 2008-03-19 07:28:33 +00:00
MemCpyOpt Fix a bug in memcpyopt where the memcpy-memcpy transform was never being applied because 2008-04-29 21:26:06 +00:00
PredicateSimplifier Upgrade tests. 2008-03-19 05:39:35 +00:00
PruneEH Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989 2008-04-25 16:53:59 +00:00
RaiseAllocations Upgrade tests. 2008-03-19 05:39:35 +00:00
Reassociate Upgrade tests to not use llvm-upgrade. 2008-03-19 04:36:04 +00:00
ScalarRepl Upgrade tests to not use llvm-upgrade. 2008-03-18 04:14:37 +00:00
SCCP Use loop deletion instead of ADCE in these tests. 2008-05-16 04:33:37 +00:00
SimplifyCFG Update old-style syntax in some "not grep" tests. 2008-05-01 23:50:07 +00:00
SimplifyLibCalls Fix PR2341 - when the length is 4 use an i32 not 2008-05-19 09:27:24 +00:00
SRETPromotion Fix attribute handling. 2008-03-12 00:07:03 +00:00
StripSymbols Do not strip llvm.used values. 2008-01-16 03:33:05 +00:00
TailCallElim Remove llvm-upgrade and update tests. 2008-03-10 07:21:50 +00:00
TailDup Fix test. 2008-05-16 17:08:51 +00:00