[llvm] Revert "[Legalizer] Check full condition for UMIN and UMAX just like the code below does for SMIN and SMAX" (PR #93573)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 28 09:25:40 PDT 2024


https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/93573

Reverts llvm/llvm-project#87932

>From 92c89fe87fbecafa208de688dff4bfcc760d4e35 Mon Sep 17 00:00:00 2001
From: AtariDreams <gfunni234 at gmail.com>
Date: Tue, 28 May 2024 12:25:31 -0400
Subject: [PATCH] =?UTF-8?q?Revert=20"[Legalizer]=20Check=20full=20conditio?=
 =?UTF-8?q?n=20for=20UMIN=20and=20UMAX=20just=20like=20the=20code=E2=80=A6?=
 =?UTF-8?q?"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 70bf1396517be14a92bc69dcb0bf44179c937d93.
---
 llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index c04f7208c61f2..d8b0f52ecf9e3 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -3972,7 +3972,7 @@ LegalizerHelper::lower(MachineInstr &MI, unsigned TypeIdx, LLT LowerHintTy) {
     // target can override this with custom lowering and calling the
     // implementation functions.
     LLT Ty = MRI.getType(MI.getOperand(0).getReg());
-    if (LI.isLegalOrCustom({G_UMIN, Ty}) && LI.isLegalOrCustom({G_UMAX, Ty}))
+    if (LI.isLegalOrCustom({G_UMIN, Ty}))
       return lowerAddSubSatToMinMax(MI);
     return lowerAddSubSatToAddoSubo(MI);
   }



More information about the llvm-commits mailing list