diff options
author | Chris Lattner <sabre@nondot.org> | 2004-09-29 05:07:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-09-29 05:07:12 +0000 |
commit | 4e998b2fea377b8853d2e074b40d33f48163d859 (patch) | |
tree | 4794c1cb80db08d6375be5cc068530a74cf320f8 /lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | e14a9a71d3dcf68e84fe3e609fc8f9a1e7ba4832 (diff) |
Fold binary expressions and casts into PHI nodes that have all constant inputs.
This takes something like this:
%A = phi int [ 3, %cond_false.0 ], [ 2, %endif.0.i ], [ 2, %endif.1.i ]
%B = div int %tmp.243, 4
and turns it into:
%A = phi int [ 3/4, %cond_false.0 ], [ 2/4, %endif.0.i ], [ 2/4, %endif.1.i ]
which is later simplified (in this case) into %A = 0.
This triggers thousands of times in spec, for example, 269 times in 176.gcc.
This is tested by InstCombine/add.ll:test23 and set.ll:test18.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16582 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
0 files changed, 0 insertions, 0 deletions