[llvm] [X86][GlobalIsel] Add support for G_UMIN/G_UMAX/G_SMIN/G_SMAX (PR #160247)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 25 00:59:42 PDT 2025


================
@@ -147,6 +147,11 @@ X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
         });
   }
 
+  getActionDefinitionsBuilder({G_UMIN, G_UMAX, G_SMIN, G_SMAX})
+      .widenScalarToNextPow2(0, /*Min=*/32)
+      .clampScalar(0, s8, s64)
----------------
RKSimon wrote:

Whatever you chose to do it should be consistent with other similar integer arithmetic ops

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


More information about the llvm-commits mailing list