summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-04 23:23:56 +0000
committerDan Gohman <gohman@apple.com>2009-08-04 23:23:56 +0000
commit298bce2aa965e38781d9132666fc0e25f949130a (patch)
treeadd2cd9dab37e7ab6a26763fb33fb417bb3ce059
parent6faa1d2f8fe4c0feb49d72767c37104fd270c295 (diff)
downloadbcm5719-llvm-298bce2aa965e38781d9132666fc0e25f949130a.tar.gz
bcm5719-llvm-298bce2aa965e38781d9132666fc0e25f949130a.zip
Check for !isa<Constant> instead of isa<Instruction>. This
matches what the comment says, and it avoids spurious BitCast instructions for Argument values. llvm-svn: 78121
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 6554d6a4527..f8be95fc0d3 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/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",
OpenPOWER on IntegriCloud