diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-04 23:23:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-04 23:23:56 +0000 |
commit | 3fe14bf15338866b21784a64b78e53b5801523c8 (patch) | |
tree | 494f028bf1bdbca46fd621ba0b5f30f6f3d081ff /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | f363bc83260b68aecc377da0b383c369ffd99b1e (diff) |
Check for !isa<Constant> instead of isa<Instruction>. This
matches what the comment says, and it avoids spurious BitCast
instructions for Argument values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 6554d6a452..f8be95fc0d 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1637,7 +1637,7 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEV *const &Stride, // do this by forcing a BitCast (noop cast) to be inserted into the // preheader in this case. if (!fitsInAddressMode(Base, getAccessType(Inst), TLI, false) && - !isa<Instruction>(BaseV)) { + isa<Constant>(BaseV)) { // We want this constant emitted into the preheader! This is just // using cast as a copy so BitCast (no-op cast) is appropriate BaseV = new BitCastInst(BaseV, BaseV->getType(), "preheaderinsert", |