@@ -1267,7 +1267,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
1267
1267
1268
1268
for (auto VT : { MVT::v4i32, MVT::v8i32, MVT::v2i64, MVT::v4i64,
1269
1269
MVT::v4f32, MVT::v8f32, MVT::v2f64, MVT::v4f64 }) {
1270
- setOperationAction(ISD::MLOAD, VT, Custom);
1270
+ setOperationAction(ISD::MLOAD, VT, Subtarget.hasVLX() ? Legal : Custom);
1271
1271
setOperationAction(ISD::MSTORE, VT, Legal);
1272
1272
}
1273
1273
@@ -1416,10 +1416,12 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
1416
1416
// With 512-bit vectors and no VLX, we prefer to widen MLOAD/MSTORE
1417
1417
// to 512-bit rather than use the AVX2 instructions so that we can use
1418
1418
// k-masks.
1419
- for (auto VT : {MVT::v4i32, MVT::v8i32, MVT::v2i64, MVT::v4i64,
1420
- MVT::v4f32, MVT::v8f32, MVT::v2f64, MVT::v4f64}) {
1421
- setOperationAction(ISD::MLOAD, VT, Subtarget.hasVLX() ? Legal : Custom);
1422
- setOperationAction(ISD::MSTORE, VT, Subtarget.hasVLX() ? Legal : Custom);
1419
+ if (!Subtarget.hasVLX()) {
1420
+ for (auto VT : {MVT::v4i32, MVT::v8i32, MVT::v2i64, MVT::v4i64,
1421
+ MVT::v4f32, MVT::v8f32, MVT::v2f64, MVT::v4f64}) {
1422
+ setOperationAction(ISD::MLOAD, VT, Custom);
1423
+ setOperationAction(ISD::MSTORE, VT, Custom);
1424
+ }
1423
1425
}
1424
1426
1425
1427
setOperationAction(ISD::TRUNCATE, MVT::v8i32, Custom);
0 commit comments