[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 20 22:45:52 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.69 -> 1.70
---
Log message:
My previous patch was too conservative. Reject FP and void types, but do
allow pointer types.
---
Diffs of the changes: (+2 -1)
LoopStrengthReduce.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.69 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.70
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.69 Wed Oct 19 23:47:10 2005
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri Oct 21 00:45:41 2005
@@ -372,7 +372,8 @@
/// return true. Otherwise, return false.
bool LoopStrengthReduce::AddUsersIfInteresting(Instruction *I, Loop *L,
std::set<Instruction*> &Processed) {
- if (!I->getType()->isInteger()) return false;
+ if (!I->getType()->isInteger() && !isa<PointerType>(I->getType()))
+ return false; // Void and FP expressions cannot be reduced.
if (!Processed.insert(I).second)
return true; // Instruction already handled.
More information about the llvm-commits
mailing list