mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
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
This commit is contained in:
parent
f363bc8326
commit
3fe14bf153
@ -1637,7 +1637,7 @@ void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEV *const &Stride,
|
|||||||
// do this by forcing a BitCast (noop cast) to be inserted into the
|
// do this by forcing a BitCast (noop cast) to be inserted into the
|
||||||
// preheader in this case.
|
// preheader in this case.
|
||||||
if (!fitsInAddressMode(Base, getAccessType(Inst), TLI, false) &&
|
if (!fitsInAddressMode(Base, getAccessType(Inst), TLI, false) &&
|
||||||
!isa<Instruction>(BaseV)) {
|
isa<Constant>(BaseV)) {
|
||||||
// We want this constant emitted into the preheader! This is just
|
// We want this constant emitted into the preheader! This is just
|
||||||
// using cast as a copy so BitCast (no-op cast) is appropriate
|
// using cast as a copy so BitCast (no-op cast) is appropriate
|
||||||
BaseV = new BitCastInst(BaseV, BaseV->getType(), "preheaderinsert",
|
BaseV = new BitCastInst(BaseV, BaseV->getType(), "preheaderinsert",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user