llvm-6502/test/Transforms
Duncan Sands 593faa53fa My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC
benchmarks, and that it can be simplified to X/Y.  (In general you can only
simplify (Z*Y)/Y to Z if the multiplication did not overflow; if Z has the
form "X/Y" then this is the case).  This patch implements that transform and
moves some Div logic out of instcombine and into InstructionSimplify.
Unfortunately instcombine gets in the way somewhat, since it likes to change
(X/Y)*Y into X-(X rem Y), so I had to teach instcombine about this too.
Finally, thanks to the NSW/NUW flags, sometimes we know directly that "Z*Y"
does not overflow, because the flag says so, so I added that logic too.  This
eliminates a bunch of divisions and subtractions in 447.dealII, and has good
effects on some other benchmarks too.  It seems to have quite an effect on
tramp3d-v4 but it's hard to say if it's good or bad because inlining decisions
changed, resulting in massive changes all over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124487 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-28 16:51:11 +00:00
..
ADCE
ArgumentPromotion fix PR8932, a case where arg promotion could infinitely promote. 2011-01-16 08:09:24 +00:00
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare temporarily revert r123526. While working on a follow-on patch I 2011-01-15 07:51:19 +00:00
ConstantMerge Don't merge two constants if we care about the address of both. 2011-01-16 17:05:09 +00:00
ConstProp Add a constant folding of casts from zero to zero. Fixes PR9011! 2011-01-21 01:12:09 +00:00
CorrelatedValuePropagation Test for lazy value info's ability to prove the absense of NULLs in pointers. 2011-01-16 21:57:20 +00:00
DeadArgElim Teach DAE to look for functions whose arguments are unused, and change all callers to pass in an undefvalue instead. 2011-01-16 21:25:33 +00:00
DeadStoreElimination
EarlyCSE
FunctionAttrs
GlobalDCE
GlobalOpt Add unnamed_addr when we can show that address of a global is not used. 2011-01-19 16:32:21 +00:00
GVN
IndVarSimplify
Inline relax testcase a bit. 2011-01-14 07:46:33 +00:00
InstCombine My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
InstSimplify My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
Internalize
IPConstantProp
JumpThreading Revert r124462. There are a few big regressions that I need to fix first. 2011-01-28 07:12:38 +00:00
LCSSA
LICM
LoopDeletion
LoopIdiom
LoopRotate merge tests into one crash.ll test. 2011-01-11 07:50:07 +00:00
LoopSimplify
LoopStrengthReduce
LoopUnroll
LoopUnswitch
LowerAtomic
LowerInvoke
LowerSetJmp
LowerSwitch
Mem2Reg
MemCpyOpt Actually check memcpy lengths, instead of just commenting about 2011-01-21 22:07:57 +00:00
MergeFunc Fix surprising missed optimization in mergefunc where we forgot to consider 2011-01-27 08:38:19 +00:00
PruneEH
Reassociate Fix PR9039, a use-after-free in reassociate. The issue was that the 2011-01-26 10:08:38 +00:00
ScalarRepl merge all the "crash tests" into crash.ll 2011-01-24 03:37:34 +00:00
SCCP
SimplifyCFG Revert r124462. There are a few big regressions that I need to fix first. 2011-01-28 07:12:38 +00:00
SimplifyLibCalls
Sink
SRETPromotion
StripSymbols
TailCallElim
TailDup