[llvm] s390x: pattern match saturated truncation (PR #155377)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 04:49:02 PDT 2025


================
@@ -1269,11 +1282,24 @@ multiclass IntegerMinMaxVectorOps<ValueType type, SDPatternOperator cmph,
   }
 }
 
+multiclass SignedIntegerMinMaxVectorOps<ValueType type, SDPatternOperator cmph,
+                                  Instruction min, Instruction max> {
+  defm : IntegerMinMaxVectorOps<type, cmph, min, max>;
+
+  let Predicates = [FeatureVector] in {
+    def : Pat<(type (smax VR128:$x, VR128:$y)),
----------------
uweigand wrote:

Yes, that's probably good enough.  The tests verify that the icmp/select sequence is implemented via these instructions, so if that still works, we should be good.

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


More information about the llvm-commits mailing list