[llvm] s390x: pattern match saturated truncation (PR #155377)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 02:16:31 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:
This can be done simply by using `smax` instead of `null_frag` in the VMX... patterns. (You can still keep the `IntegerMinMaxVectorOps` as they are to match additional opportunities if necessary ... but doesn't common DAGCombiner code recognize them already?)
https://github.com/llvm/llvm-project/pull/155377
More information about the llvm-commits
mailing list