mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-05 19:29:01 +00:00
[AArch64] Fix invalid use of references to BuildMI.
This was found in GCC PR65773 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65773). We shouldn't be taking a reference to the temporary that BuildMI returns, we must copy it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235088 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5ade5fcee4
commit
5717e28019
@ -1526,7 +1526,7 @@ void AArch64InstrInfo::copyPhysRegTuple(
|
||||
}
|
||||
|
||||
for (; SubReg != End; SubReg += Incr) {
|
||||
const MachineInstrBuilder &MIB = BuildMI(MBB, I, DL, get(Opcode));
|
||||
const MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(Opcode));
|
||||
AddSubReg(MIB, DestReg, Indices[SubReg], RegState::Define, TRI);
|
||||
AddSubReg(MIB, SrcReg, Indices[SubReg], 0, TRI);
|
||||
AddSubReg(MIB, SrcReg, Indices[SubReg], getKillRegState(KillSrc), TRI);
|
||||
@ -1904,7 +1904,7 @@ void AArch64InstrInfo::storeRegToStackSlot(
|
||||
}
|
||||
assert(Opc && "Unknown register class");
|
||||
|
||||
const MachineInstrBuilder &MI = BuildMI(MBB, MBBI, DL, get(Opc))
|
||||
const MachineInstrBuilder MI = BuildMI(MBB, MBBI, DL, get(Opc))
|
||||
.addReg(SrcReg, getKillRegState(isKill))
|
||||
.addFrameIndex(FI);
|
||||
|
||||
@ -2002,7 +2002,7 @@ void AArch64InstrInfo::loadRegFromStackSlot(
|
||||
}
|
||||
assert(Opc && "Unknown register class");
|
||||
|
||||
const MachineInstrBuilder &MI = BuildMI(MBB, MBBI, DL, get(Opc))
|
||||
const MachineInstrBuilder MI = BuildMI(MBB, MBBI, DL, get(Opc))
|
||||
.addReg(DestReg, getDefRegState(true))
|
||||
.addFrameIndex(FI);
|
||||
if (Offset)
|
||||
|
Loading…
Reference in New Issue
Block a user