@@ -1454,12 +1454,8 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
1454
1454
setOperationAction(ISD::INSERT_SUBVECTOR, VT, Custom);
1455
1455
setOperationAction(ISD::UINT_TO_FP, VT, Custom);
1456
1456
setOperationAction(ISD::SINT_TO_FP, VT, Custom);
1457
- setOperationAction(ISD::STRICT_UINT_TO_FP, VT, Custom);
1458
- setOperationAction(ISD::STRICT_SINT_TO_FP, VT, Custom);
1459
1457
setOperationAction(ISD::FP_TO_UINT, VT, Custom);
1460
1458
setOperationAction(ISD::FP_TO_SINT, VT, Custom);
1461
- setOperationAction(ISD::STRICT_FP_TO_UINT, VT, Custom);
1462
- setOperationAction(ISD::STRICT_FP_TO_SINT, VT, Custom);
1463
1459
setOperationAction(ISD::MLOAD, VT, Custom);
1464
1460
setOperationAction(ISD::MUL, VT, Custom);
1465
1461
setOperationAction(ISD::MULHS, VT, Custom);
@@ -2142,8 +2138,6 @@ void AArch64TargetLowering::addTypeForFixedLengthSVE(MVT VT) {
2142
2138
setOperationAction(ISD::FP_ROUND, VT, Default);
2143
2139
setOperationAction(ISD::FP_TO_SINT, VT, Default);
2144
2140
setOperationAction(ISD::FP_TO_UINT, VT, Default);
2145
- setOperationAction(ISD::STRICT_FP_TO_SINT, VT, Default);
2146
- setOperationAction(ISD::STRICT_FP_TO_UINT, VT, Default);
2147
2141
setOperationAction(ISD::FRINT, VT, Default);
2148
2142
setOperationAction(ISD::LRINT, VT, Default);
2149
2143
setOperationAction(ISD::LLRINT, VT, Default);
@@ -2170,7 +2164,6 @@ void AArch64TargetLowering::addTypeForFixedLengthSVE(MVT VT) {
2170
2164
setOperationAction(ISD::SIGN_EXTEND, VT, Default);
2171
2165
setOperationAction(ISD::SIGN_EXTEND_INREG, VT, Default);
2172
2166
setOperationAction(ISD::SINT_TO_FP, VT, Default);
2173
- setOperationAction(ISD::STRICT_SINT_TO_FP, VT, Default);
2174
2167
setOperationAction(ISD::SMAX, VT, Default);
2175
2168
setOperationAction(ISD::SMIN, VT, Default);
2176
2169
setOperationAction(ISD::SPLAT_VECTOR, VT, Default);
@@ -2181,7 +2174,6 @@ void AArch64TargetLowering::addTypeForFixedLengthSVE(MVT VT) {
2181
2174
setOperationAction(ISD::TRUNCATE, VT, Default);
2182
2175
setOperationAction(ISD::UDIV, VT, Default);
2183
2176
setOperationAction(ISD::UINT_TO_FP, VT, Default);
2184
- setOperationAction(ISD::STRICT_UINT_TO_FP, VT, Default);
2185
2177
setOperationAction(ISD::UMAX, VT, Default);
2186
2178
setOperationAction(ISD::UMIN, VT, Default);
2187
2179
setOperationAction(ISD::VECREDUCE_ADD, VT, Default);
@@ -4649,8 +4641,8 @@ static bool CanLowerToScalarSVEFPIntConversion(EVT VT) {
4649
4641
4650
4642
/// Lowers a scalar FP conversion (to/from) int to SVE.
4651
4643
static SDValue LowerScalarFPConversionToSVE(SDValue Op, SelectionDAG &DAG) {
4652
- bool IsStrict = Op->isStrictFPOpcode();
4653
- SDValue SrcVal = Op.getOperand(IsStrict ? 1 : 0);
4644
+ assert(! Op->isStrictFPOpcode() && "strict fp ops not supported" );
4645
+ SDValue SrcVal = Op.getOperand(0);
4654
4646
EVT SrcTy = SrcVal.getValueType();
4655
4647
EVT DestTy = Op.getValueType();
4656
4648
EVT SrcVecTy;
@@ -4672,14 +4664,9 @@ static SDValue LowerScalarFPConversionToSVE(SDValue Op, SelectionDAG &DAG) {
4672
4664
SDValue ZeroIdx = DAG.getVectorIdxConstant(0, dl);
4673
4665
SDValue Vec = DAG.getNode(ISD::INSERT_VECTOR_ELT, dl, SrcVecTy,
4674
4666
DAG.getUNDEF(SrcVecTy), SrcVal, ZeroIdx);
4675
- Vec = IsStrict ? DAG.getNode(Op.getOpcode(), dl, {DestVecTy, MVT::Other},
4676
- {Op.getOperand(0), Vec})
4677
- : DAG.getNode(Op.getOpcode(), dl, DestVecTy, Vec);
4678
- SDValue Scalar =
4679
- DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, Op.getValueType(), Vec, ZeroIdx);
4680
- if (IsStrict)
4681
- return DAG.getMergeValues({Scalar, Vec.getValue(1)}, dl);
4682
- return Scalar;
4667
+ Vec = DAG.getNode(Op.getOpcode(), dl, DestVecTy, Vec);
4668
+ return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, Op.getValueType(), Vec,
4669
+ ZeroIdx);
4683
4670
}
4684
4671
4685
4672
SDValue AArch64TargetLowering::LowerFP_TO_INT(SDValue Op,
@@ -4690,7 +4677,7 @@ SDValue AArch64TargetLowering::LowerFP_TO_INT(SDValue Op,
4690
4677
if (SrcVal.getValueType().isVector())
4691
4678
return LowerVectorFP_TO_INT(Op, DAG);
4692
4679
4693
- if (!Subtarget->isNeonAvailable() &&
4680
+ if (!IsStrict && ! Subtarget->isNeonAvailable() &&
4694
4681
Subtarget->isSVEorStreamingSVEAvailable() &&
4695
4682
CanLowerToScalarSVEFPIntConversion(SrcVal.getValueType()) &&
4696
4683
CanLowerToScalarSVEFPIntConversion(Op.getValueType()))
@@ -4999,7 +4986,7 @@ SDValue AArch64TargetLowering::LowerINT_TO_FP(SDValue Op,
4999
4986
bool IsStrict = Op->isStrictFPOpcode();
5000
4987
SDValue SrcVal = Op.getOperand(IsStrict ? 1 : 0);
5001
4988
5002
- if (!Subtarget->isNeonAvailable() &&
4989
+ if (!IsStrict && ! Subtarget->isNeonAvailable() &&
5003
4990
Subtarget->isSVEorStreamingSVEAvailable() &&
5004
4991
CanLowerToScalarSVEFPIntConversion(SrcVal.getValueType()) &&
5005
4992
CanLowerToScalarSVEFPIntConversion(Op.getValueType()))
@@ -28411,12 +28398,7 @@ SDValue AArch64TargetLowering::LowerToPredicatedOp(SDValue Op,
28411
28398
assert(VT.isScalableVector() && "Only expect to lower scalable vector op!");
28412
28399
28413
28400
SmallVector<SDValue, 4> Operands = {Pg};
28414
- SDValue Chain{};
28415
28401
for (const SDValue &V : Op->op_values()) {
28416
- if (!isa<CondCodeSDNode>(V) && V.getValueType() == MVT::Other) {
28417
- Chain = V;
28418
- continue;
28419
- }
28420
28402
assert((!V.getValueType().isVector() ||
28421
28403
V.getValueType().isScalableVector()) &&
28422
28404
"Only scalable vectors are supported!");
@@ -28426,10 +28408,7 @@ SDValue AArch64TargetLowering::LowerToPredicatedOp(SDValue Op,
28426
28408
if (isMergePassthruOpcode(NewOp))
28427
28409
Operands.push_back(DAG.getUNDEF(VT));
28428
28410
28429
- auto NewNode = DAG.getNode(NewOp, DL, VT, Operands, Op->getFlags());
28430
- if (Chain)
28431
- return DAG.getMergeValues({NewNode, Chain}, DL);
28432
- return NewNode;
28411
+ return DAG.getNode(NewOp, DL, VT, Operands, Op->getFlags());
28433
28412
}
28434
28413
28435
28414
// If a fixed length vector operation has no side effects when applied to
0 commit comments