From: Dan Gohman Date: Tue, 4 Aug 2009 23:23:56 +0000 (+0000) Subject: Check for !isa instead of isa. This X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3fe14bf15338866b21784a64b78e53b5801523c8;p=oota-llvm.git Check for !isa instead of isa. 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 --- diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 6554d6a4527..f8be95fc0d3 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(BaseV)) { + isa(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",