[llvm-branch-commits] [llvm] GlobalISel: Fix combine duplicating atomic loads (PR #111730)
Thorsten Schütt via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Oct 9 22:05:47 PDT 2024
================
@@ -1110,6 +1110,7 @@ void CombinerHelper::applySextInRegOfLoad(
Builder.buildLoadInstr(TargetOpcode::G_SEXTLOAD, MI.getOperand(0).getReg(),
LoadDef->getPointerReg(), *NewMMO);
MI.eraseFromParent();
+ LoadDef->eraseFromParent();
----------------
tschuett wrote:
Please add a comment why the second `eraseFromParent` is needed.
https://github.com/llvm/llvm-project/pull/111730
More information about the llvm-branch-commits
mailing list