================ @@ -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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits