[llvm] [ARM] Allow usubo and uaddo to happen for any legal type (PR #163457)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 14 14:36:58 PDT 2025


https://github.com/AZero13 created https://github.com/llvm/llvm-project/pull/163457

None

>From ae76cadef3857696c274053ee553239ddb52e4c7 Mon Sep 17 00:00:00 2001
From: AZero13 <gfunni234 at gmail.com>
Date: Tue, 14 Oct 2025 17:36:29 -0400
Subject: [PATCH] [ARM] Allow usubo and uaddo to happen for any legal type

---
 llvm/lib/Target/AArch64/AArch64ISelLowering.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.h b/llvm/lib/Target/AArch64/AArch64ISelLowering.h
index 00956fdc8e48e..fa3b8aa559eed 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.h
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.h
@@ -328,9 +328,9 @@ class AArch64TargetLowering : public TargetLowering {
 
   bool shouldFormOverflowOp(unsigned Opcode, EVT VT,
                             bool MathUsed) const override {
-    // Using overflow ops for overflow checks only should beneficial on
-    // AArch64.
-    return TargetLowering::shouldFormOverflowOp(Opcode, VT, true);
+    if (VT.isVector())
+      return false;
+    return !isOperationExpand(Opcode, VT);
   }
 
   Value *emitLoadLinked(IRBuilderBase &Builder, Type *ValueTy, Value *Addr,



More information about the llvm-commits mailing list