[AArch64][GlobalISel] Notify observer of mutated instruction for shift custom legaliz...
authorAmara Emerson <amara@apple.com>
Fri, 25 Dec 2020 08:31:47 +0000 (00:31 -0800)
committerAmara Emerson <amara@apple.com>
Fri, 25 Dec 2020 08:31:47 +0000 (00:31 -0800)
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.

llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp

index 0774f7b..a611d68 100644 (file)
@@ -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;
 }