Skip to content

Commit 47175b2

Browse files
committed
s390x: remove IntegerMinMaxVectorOps multiclass
The more general smin/umin/smax/umax are now legal, so these patterns are no longer needed
1 parent 656bd57 commit 47175b2

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

llvm/lib/Target/SystemZ/SystemZInstrVector.td

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,55 +1250,6 @@ defm : IntegerAbsoluteVectorOps<v8i16, VLCH, VLPH, 15>;
12501250
defm : IntegerAbsoluteVectorOps<v4i32, VLCF, VLPF, 31>;
12511251
defm : IntegerAbsoluteVectorOps<v2i64, VLCG, VLPG, 63>;
12521252

1253-
// Instantiate minimum- and maximum-related patterns for TYPE. CMPH is the
1254-
// signed or unsigned "set if greater than" comparison instruction and
1255-
// MIN and MAX are the associated minimum and maximum instructions.
1256-
multiclass IntegerMinMaxVectorOps<ValueType type, SDPatternOperator cmph,
1257-
Instruction min, Instruction max> {
1258-
let Predicates = [FeatureVector] in {
1259-
def : Pat<(type (vselect (cmph VR128:$x, VR128:$y), VR128:$x, VR128:$y)),
1260-
(max VR128:$x, VR128:$y)>;
1261-
def : Pat<(type (vselect (cmph VR128:$x, VR128:$y), VR128:$y, VR128:$x)),
1262-
(min VR128:$x, VR128:$y)>;
1263-
def : Pat<(type (vselect (z_vnot (cmph VR128:$x, VR128:$y)),
1264-
VR128:$x, VR128:$y)),
1265-
(min VR128:$x, VR128:$y)>;
1266-
def : Pat<(type (vselect (z_vnot (cmph VR128:$x, VR128:$y)),
1267-
VR128:$y, VR128:$x)),
1268-
(max VR128:$x, VR128:$y)>;
1269-
}
1270-
}
1271-
1272-
// Signed min/max.
1273-
defm : IntegerMinMaxVectorOps<v16i8, z_vicmph, VMNB, VMXB>;
1274-
defm : IntegerMinMaxVectorOps<v8i16, z_vicmph, VMNH, VMXH>;
1275-
defm : IntegerMinMaxVectorOps<v4i32, z_vicmph, VMNF, VMXF>;
1276-
defm : IntegerMinMaxVectorOps<v2i64, z_vicmph, VMNG, VMXG>;
1277-
1278-
let Predicates = [FeatureVectorEnhancements3] in {
1279-
def : Pat<(i128 (or (and VR128:$x, (z_vicmph VR128:$x, VR128:$y)),
1280-
(and VR128:$y, (not (z_vicmph VR128:$x, VR128:$y))))),
1281-
(VMXQ VR128:$x, VR128:$y)>;
1282-
def : Pat<(i128 (or (and VR128:$y, (z_vicmph VR128:$x, VR128:$y)),
1283-
(and VR128:$x, (not (z_vicmph VR128:$x, VR128:$y))))),
1284-
(VMNQ VR128:$x, VR128:$y)>;
1285-
}
1286-
1287-
// Unsigned min/max.
1288-
defm : IntegerMinMaxVectorOps<v16i8, z_vicmphl, VMNLB, VMXLB>;
1289-
defm : IntegerMinMaxVectorOps<v8i16, z_vicmphl, VMNLH, VMXLH>;
1290-
defm : IntegerMinMaxVectorOps<v4i32, z_vicmphl, VMNLF, VMXLF>;
1291-
defm : IntegerMinMaxVectorOps<v2i64, z_vicmphl, VMNLG, VMXLG>;
1292-
1293-
let Predicates = [FeatureVectorEnhancements3] in {
1294-
def : Pat<(i128 (or (and VR128:$x, (z_vicmphl VR128:$x, VR128:$y)),
1295-
(and VR128:$y, (not (z_vicmphl VR128:$x, VR128:$y))))),
1296-
(VMXLQ VR128:$x, VR128:$y)>;
1297-
def : Pat<(i128 (or (and VR128:$y, (z_vicmphl VR128:$x, VR128:$y)),
1298-
(and VR128:$x, (not (z_vicmphl VR128:$x, VR128:$y))))),
1299-
(VMNLQ VR128:$x, VR128:$y)>;
1300-
}
1301-
13021253
// Instantiate packs/packu: recognize a saturating truncation and convert
13031254
// into the corresponding packs/packu instruction.
13041255
multiclass SignedSaturatingTruncate<ValueType input, ValueType output,

0 commit comments

Comments
 (0)