[llvm] 70bf139 - [Legalizer] Check full condition for UMIN and UMAX just like the code below does for SMIN and SMAX (#87932)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 26 12:07:34 PDT 2024
Author: AtariDreams
Date: 2024-05-26T15:07:31-04:00
New Revision: 70bf1396517be14a92bc69dcb0bf44179c937d93
URL: https://github.com/llvm/llvm-project/commit/70bf1396517be14a92bc69dcb0bf44179c937d93
DIFF: https://github.com/llvm/llvm-project/commit/70bf1396517be14a92bc69dcb0bf44179c937d93.diff
LOG: [Legalizer] Check full condition for UMIN and UMAX just like the code below does for SMIN and SMAX (#87932)
Added:
Modified:
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index d8b0f52ecf9e3..c04f7208c61f2 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}))
+ if (LI.isLegalOrCustom({G_UMIN, Ty}) && LI.isLegalOrCustom({G_UMAX, Ty}))
return lowerAddSubSatToMinMax(MI);
return lowerAddSubSatToAddoSubo(MI);
}
More information about the llvm-commits
mailing list