1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib
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
..
Analysis My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
Archive Archive: Fix temp path names. 2011-01-17 16:43:30 +00:00
AsmParser Move unnamed_addr after the function arguments on Sabre's request. 2011-01-25 19:09:56 +00:00
Bitcode FixedNumOperandTraits and VariadicOperandTraits assumed that, given a 2011-01-11 15:07:38 +00:00
CodeGen Revert r124462. There are a few big regressions that I need to fix first. 2011-01-28 07:12:38 +00:00
CompilerDriver Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists. 2011-01-10 02:34:23 +00:00
ExecutionEngine Fix libffi usage when it is on a custom path. 2011-01-28 16:49:05 +00:00
Linker Allow unnamed_addr on declarations. 2011-01-15 08:15:00 +00:00
MC Add support for parsing .float 2011-01-28 14:20:32 +00:00
Object Object: Fix type punned pointer issues by making DataRefImpl a union and using intptr_t. 2011-01-21 02:27:02 +00:00
Support Support/CommandLine: Fix LookupNearestOption to also search extra option names. 2011-01-24 17:27:17 +00:00
Target Fix PLD encoding. 2011-01-27 23:48:34 +00:00
Transforms My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
VMCore Fix indentation. 2011-01-27 14:44:55 +00:00
Makefile Add LLVMObject Library. 2010-11-15 03:21:41 +00:00