mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Stay away from str <undef> in ARMLoadStoreOpt. This pass does not understand
<undef> operands, and can cause scavenger failures when it translates <kill,undef> to <kill>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97046 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -748,11 +748,19 @@ static bool isMemoryOp(const MachineInstr *MI) {
|
|||||||
if (MMO->isVolatile())
|
if (MMO->isVolatile())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Unaligned ldr/str is emulated by some kernels, but unaligned ldm/stm is not.
|
// Unaligned ldr/str is emulated by some kernels, but unaligned ldm/stm is
|
||||||
|
// not.
|
||||||
if (MMO->getAlignment() < 4)
|
if (MMO->getAlignment() < 4)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// str <undef> could probably be eliminated entirely, but for now we just want
|
||||||
|
// to avoid making a mess of it.
|
||||||
|
// FIXME: Use str <undef> as a wildcard to enable better stm folding.
|
||||||
|
if (MI->getNumOperands() > 0 && MI->getOperand(0).isReg() &&
|
||||||
|
MI->getOperand(0).isUndef())
|
||||||
|
return false;
|
||||||
|
|
||||||
int Opcode = MI->getOpcode();
|
int Opcode = MI->getOpcode();
|
||||||
switch (Opcode) {
|
switch (Opcode) {
|
||||||
default: break;
|
default: break;
|
||||||
|
Reference in New Issue
Block a user