1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/Transforms
Duncan Sands 1a18d8df96 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.

llvm-svn: 124487
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 Fix PR8728, a miscompilation I recently introduced. When optimizing 2010-12-06 01:48:06 +00:00
EarlyCSE Duncan deftly points out that readnone functions aren't 2011-01-03 23:38:13 +00:00
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 Give GVN back the ability to perform simple conditional propagation on conditional branch values. 2010-12-21 23:54:34 +00:00
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 Enhance LICM to promote alias sets whose pointers themselves are stored, 2010-12-19 05:57:25 +00:00
LoopDeletion
LoopIdiom Teach loop-idiom to turn a loop containing a memset into a larger memset 2011-01-04 07:46:33 +00:00
LoopRotate merge tests into one crash.ll test. 2011-01-11 07:50:07 +00:00
LoopSimplify Fix PR8702 by not having LoopSimplify claim to preserve LCSSA form. As described 2011-01-02 13:38:21 +00:00
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 Revert r64460. strtol and friends cannot be marked readonly, even with 2010-12-17 01:09:43 +00:00
Sink
SRETPromotion
StripSymbols
TailCallElim
TailDup