From: Amara Emerson Date: Fri, 25 Dec 2020 08:31:47 +0000 (-0800) Subject: [AArch64][GlobalISel] Notify observer of mutated instruction for shift custom legaliz... X-Git-Tag: llvmorg-13-init~2577 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0721a0992288122d62940f622b4c2127098a2da;p=platform%2Fupstream%2Fllvm.git [AArch64][GlobalISel] Notify observer of mutated instruction for shift custom legalization. No test for this because it's a CSE verifier failure that's only exposed in a WIP patch for enabling CSE throughout the AArch64 GISel pipeline. --- diff --git a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp index 0774f7b..a611d68 100644 --- a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp +++ b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp @@ -841,7 +841,9 @@ bool AArch64LegalizerInfo::legalizeShlAshrLshr( if (Amount > 31) return true; // This will have to remain a register variant. auto ExtCst = MIRBuilder.buildConstant(LLT::scalar(64), Amount); + Observer.changingInstr(MI); MI.getOperand(2).setReg(ExtCst.getReg(0)); + Observer.changedInstr(MI); return true; }