Skip to content

Commit 04d3965

Browse files
authored
[AMDGPU]: Packed instructions unpacking to co-issue post-RA scheduling - fix flag handling (#160195)
This is a follow up to #157968. This fixes flag handling in inserted instructions.
1 parent 24a5d8a commit 04d3965

File tree

2 files changed

+258
-268
lines changed

2 files changed

+258
-268
lines changed

llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -674,15 +674,9 @@ void SIPreEmitPeephole::performF32Unpacking(MachineInstr &I) {
674674
createUnpackedMI(I, UnpackedOpcode, /*IsHiBits=*/true);
675675
MachineOperand HiDstOp = Op0HOp1H->getOperand(0);
676676

677-
if (I.getFlag(MachineInstr::MIFlag::NoFPExcept)) {
678-
Op0LOp1L->setFlag(MachineInstr::MIFlag::NoFPExcept);
679-
Op0HOp1H->setFlag(MachineInstr::MIFlag::NoFPExcept);
680-
}
681-
if (I.getFlag(MachineInstr::MIFlag::FmContract)) {
682-
Op0LOp1L->setFlag(MachineInstr::MIFlag::FmContract);
683-
Op0HOp1H->setFlag(MachineInstr::MIFlag::FmContract);
684-
}
685-
677+
uint32_t IFlags = I.getFlags();
678+
Op0LOp1L->setFlags(IFlags);
679+
Op0HOp1H->setFlags(IFlags);
686680
LoDstOp.setIsRenamable(DstOp.isRenamable());
687681
HiDstOp.setIsRenamable(DstOp.isRenamable());
688682

0 commit comments

Comments
 (0)