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 | 6a4adcda4cfcfc893e0d78c7a9fa1f39ff532c47 (patch) | |
| tree | 7be1c215237f5b6aab76e13448df4221ad993f51 /llvm/lib/Transforms/Utils | |
| parent | 5e0ab5c5d82f5519389ec9fe226c7fc69f7fd1f9 (diff) | |
| download | bcm5719-llvm-6a4adcda4cfcfc893e0d78c7a9fa1f39ff532c47.tar.gz bcm5719-llvm-6a4adcda4cfcfc893e0d78c7a9fa1f39ff532c47.zip | |
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.
llvm-svn: 16582
Diffstat (limited to 'llvm/lib/Transforms/Utils')
0 files changed, 0 insertions, 0 deletions

