diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-02 05:59:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-02 05:59:42 +0000 |
commit | aa43e9f73b4ccd700530803803e074eff9b3dca5 (patch) | |
tree | 6ecd1be06e78ae1c8daec328d1671e7876ef6ba5 /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | 465b7157d11c782f98c2f9f2d5ce45d94c38443e (diff) |
Fix a bug which caused us to never be able to use signed comparisons for
equality comparisons of a constant. This allows us to codegen the 'sintzero'
loop in PR1288 as:
LBB1_1: ;cond_next
li r4, 0
addi r2, r2, 1
stw r4, 0(r3)
addi r3, r3, 4
cmpwi cr0, r2, -1
bne cr0, LBB1_1 ;cond_next
instead of:
LBB1_1: ;cond_next
addi r2, r2, 1
li r4, 0
xoris r5, r2, 65535
stw r4, 0(r3)
addi r3, r3, 4
cmplwi cr0, r5, 65535
bne cr0, LBB1_1 ;cond_next
This implements CodeGen/PowerPC/compare-simm.ll, and also cuts 74
instructions out of kc++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35590 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
0 files changed, 0 insertions, 0 deletions