[llvm] [AMDGPU] Fix machine verification failure after SIFoldOperandsImpl::tryFoldOMod (PR #113544)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 15:41:27 PDT 2024
================
@@ -1793,6 +1793,12 @@ bool SIFoldOperandsImpl::tryFoldOMod(MachineInstr &MI) {
DefOMod->setImm(OMod);
MRI->replaceRegWith(MI.getOperand(0).getReg(), Def->getOperand(0).getReg());
+ if (Def->getParent() != MI.getParent()) {
----------------
arsenm wrote:
You can just unconditionally clear the flags, they'll just get recomputed again later anyway
https://github.com/llvm/llvm-project/pull/113544
More information about the llvm-commits
mailing list