[llvm] [LLVM] treat `@llvm.ssub.sat` the same as `@llvm.aarch64.neon.sqsub` (PR #140454)

David Green via llvm-commits llvm-commits at lists.llvm.org
Sun May 18 11:01:35 PDT 2025


================
@@ -1795,6 +1795,34 @@ bool AArch64LegalizerInfo::legalizeIntrinsic(LegalizerHelper &Helper,
     MI.eraseFromParent();
     return true;
   }
+  case Intrinsic::aarch64_neon_sqadd: {
+    MachineIRBuilder MIB(MI);
+    if (MIB.getMRI()->getType(MI.getOperand(0).getReg()).isVector())
----------------
davemgreen wrote:

Can you create a `MachineRegisterInfo &MRI = *MIB.getMRI();` at the top of this function?

https://github.com/llvm/llvm-project/pull/140454


More information about the llvm-commits mailing list