diff options
author | Jay Foad <jay.foad@amd.com> | 2023-09-19 16:44:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 16:44:20 +0100 |
commit | 44e997a158610f99789f4d51e7e89e2cbadb9047 (patch) | |
tree | 5993cb2194fbbb161a6362e5d9831c29b143e9e7 /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 22d0bd8632d9d94663bb5196de6240944f43b6ec (diff) | |
download | llvm-44e997a158610f99789f4d51e7e89e2cbadb9047.zip llvm-44e997a158610f99789f4d51e7e89e2cbadb9047.tar.gz llvm-44e997a158610f99789f4d51e7e89e2cbadb9047.tar.bz2 |
[TwoAddressInstruction] Use isPlainlyKilled in processTiedPairs (#65976)
Calling isPlainlyKilled instead of directly checking for a kill flag
should make processTiedPairs behave the same with LiveIntervals
(i.e. when compiling with -early-live-intervals) as it does with
LiveVariables.
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index 560a0a4..4ae3967 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1566,7 +1566,7 @@ TwoAddressInstructionPass::processTiedPairs(MachineInstr *MI, MachineOperand &MO = MI->getOperand(SrcIdx); assert(MO.isReg() && MO.getReg() == RegB && MO.isUse() && "inconsistent operand info for 2-reg pass"); - if (MO.isKill()) { + if (isPlainlyKilled(MO)) { MO.setIsKill(false); RemovedKillFlag = true; } @@ -1587,7 +1587,7 @@ TwoAddressInstructionPass::processTiedPairs(MachineInstr *MI, for (MachineOperand &MO : MI->all_uses()) { if (MO.getReg() == RegB) { if (MO.getSubReg() == SubRegB && !IsEarlyClobber) { - if (MO.isKill()) { + if (isPlainlyKilled(MO)) { MO.setIsKill(false); RemovedKillFlag = true; } |