diff options
author | Chris Lattner <sabre@nondot.org> | 2005-10-21 05:45:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-10-21 05:45:41 +0000 |
commit | 63ad7963e4fc68a418cc48e21ba175a2d7093ec9 (patch) | |
tree | 4d58c6fe0bb52508e76cad6dbfa1efbdd917661f /lib/Transforms | |
parent | d5ce204c5f22f9cf929a461521168061705e6869 (diff) | |
download | external_llvm-63ad7963e4fc68a418cc48e21ba175a2d7093ec9.zip external_llvm-63ad7963e4fc68a418cc48e21ba175a2d7093ec9.tar.gz external_llvm-63ad7963e4fc68a418cc48e21ba175a2d7093ec9.tar.bz2 |
My previous patch was too conservative. Reject FP and void types, but do
allow pointer types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 183362d..4f18637 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -372,7 +372,8 @@ 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()->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. |