From 63ad7963e4fc68a418cc48e21ba175a2d7093ec9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 21 Oct 2005 05:45:41 +0000 Subject: [PATCH] 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 --- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 183362dc0e6..4f18637c9f6 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 &Processed) { - if (!I->getType()->isInteger()) return false; + if (!I->getType()->isInteger() && !isa(I->getType())) + return false; // Void and FP expressions cannot be reduced. if (!Processed.insert(I).second) return true; // Instruction already handled. -- 2.34.1