mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 17:32:36 +00:00
Fix valgrind warning for gcc builds.
Sorry, I don't understand why the warning is generated (a gcc bug?). Anyhow, the change should improve readablity. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
527fa8c18c
commit
fc40386116
@ -816,18 +816,17 @@ bool RegisterCoalescer::reMaterializeTrivialDef(CoalescerPair &CP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (TargetRegisterInfo::isVirtualRegister(DstReg)) {
|
if (TargetRegisterInfo::isVirtualRegister(DstReg)) {
|
||||||
unsigned NewIdx = NewMI->getOperand(0).getSubReg();
|
unsigned NewIdx;
|
||||||
const TargetRegisterClass *RCForInst;
|
const TargetRegisterClass *RCForInst;
|
||||||
if (NewIdx)
|
|
||||||
RCForInst = TRI->getMatchingSuperRegClass(MRI->getRegClass(DstReg), DefRC,
|
|
||||||
NewIdx);
|
|
||||||
|
|
||||||
if (MRI->constrainRegClass(DstReg, DefRC)) {
|
if (MRI->constrainRegClass(DstReg, DefRC)) {
|
||||||
// The materialized instruction is quite capable of setting DstReg
|
// The materialized instruction is quite capable of setting DstReg
|
||||||
// directly, but it may still have a now-trivial subregister index which
|
// directly, but it may still have a now-trivial subregister index which
|
||||||
// we should clear.
|
// we should clear.
|
||||||
NewMI->getOperand(0).setSubReg(0);
|
NewMI->getOperand(0).setSubReg(0);
|
||||||
} else if (NewIdx && RCForInst) {
|
} else if ((NewIdx = NewMI->getOperand(0).getSubReg()) &&
|
||||||
|
(RCForInst = TRI->getMatchingSuperRegClass(
|
||||||
|
MRI->getRegClass(DstReg), DefRC, NewIdx))) {
|
||||||
// The subreg index on NewMI is essential; we still have to make sure
|
// The subreg index on NewMI is essential; we still have to make sure
|
||||||
// DstReg:idx is in a class that NewMI can use.
|
// DstReg:idx is in a class that NewMI can use.
|
||||||
MRI->constrainRegClass(DstReg, RCForInst);
|
MRI->constrainRegClass(DstReg, RCForInst);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user