llvm-6502/test
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
..
Analysis Add another rdar number. 2011-01-24 17:54:01 +00:00
Archive
Assembler Move unnamed_addr after the function arguments on Sabre's request. 2011-01-25 19:09:56 +00:00
Bindings/Ocaml
Bitcode
BugPoint
CodeGen Revert r124462. There are a few big regressions that I need to fix first. 2011-01-28 07:12:38 +00:00
DebugInfo
ExecutionEngine
Feature
FrontendAda Testcase for dragonegg commit 124128. 2011-01-24 18:04:33 +00:00
FrontendC
FrontendC++
FrontendFortran
FrontendObjC Update tests to accomodate unnamed_addr introduction. 2011-01-17 17:54:17 +00:00
FrontendObjC++
Integer
lib
Linker fix PR9015, a crash linking recursive metadata. 2011-01-24 03:18:24 +00:00
LLVMC
MC Add support for parsing .float 2011-01-28 14:20:32 +00:00
Object Revert "Object: Renable the tests now that none of the build bots complain about aliasing." 2011-01-21 06:27:04 +00:00
Other
Scripts
TableGen
Transforms My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPEC 2011-01-28 16:51:11 +00:00
Unit
Verifier
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
site.exp.in
TestRunner.sh