diff options
author | Chris Lattner <sabre@nondot.org> | 2005-10-20 04:47:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-10-20 04:47:10 +0000 |
commit | 0c0b38bb4c6f8d7324ae15eae7c27f849f6beb56 (patch) | |
tree | c8d8a2da9b3040b2521de68537f9110341655675 /llvm/lib | |
parent | fd07fcda67e45a96c85b3310ea608d696e2c1e9b (diff) | |
download | bcm5719-llvm-0c0b38bb4c6f8d7324ae15eae7c27f849f6beb56.tar.gz bcm5719-llvm-0c0b38bb4c6f8d7324ae15eae7c27f849f6beb56.zip |
Do NOT touch FP ops with LSR. This fixes a testcase Nate sent me from an
inner loop like this:
LBB_RateConvertMono8AltiVec_2: ; no_exit
lis r2, ha16(.CPI_RateConvertMono8AltiVec_0)
lfs f3, lo16(.CPI_RateConvertMono8AltiVec_0)(r2)
fmr f3, f3
fadd f0, f2, f0
fadd f3, f0, f3
fcmpu cr0, f3, f1
bge cr0, LBB_RateConvertMono8AltiVec_2 ; no_exit
to an inner loop like this:
LBB_RateConvertMono8AltiVec_1: ; no_exit
fsub f2, f2, f1
fcmpu cr0, f2, f1
fmr f0, f2
bge cr0, LBB_RateConvertMono8AltiVec_1 ; no_exit
Doh! good catch!
llvm-svn: 23838
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index a74b91b4f76..183362dc0e6 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -372,7 +372,7 @@ static bool IVUseShouldUsePostIncValue(Instruction *User, Instruction *IV, /// return true. Otherwise, return false. bool LoopStrengthReduce::AddUsersIfInteresting(Instruction *I, Loop *L, std::set<Instruction*> &Processed) { - if (I->getType() == Type::VoidTy) return false; + if (!I->getType()->isInteger()) return false; if (!Processed.insert(I).second) return true; // Instruction already handled. |