@@ -2033,7 +2033,8 @@ bool AArch64TargetLowering::shouldExpandGetActiveLaneMask(EVT ResVT,
2033
2033
return false;
2034
2034
}
2035
2035
2036
- bool AArch64TargetLowering::shouldExpandGetAliasLaneMask(EVT VT, EVT PtrVT, unsigned EltSize) const {
2036
+ bool AArch64TargetLowering::shouldExpandGetAliasLaneMask(
2037
+ EVT VT, EVT PtrVT, unsigned EltSize) const {
2037
2038
if (!Subtarget->hasSVE2())
2038
2039
return true;
2039
2040
@@ -2042,7 +2043,7 @@ bool AArch64TargetLowering::shouldExpandGetAliasLaneMask(EVT VT, EVT PtrVT, unsi
2042
2043
2043
2044
if (VT == MVT::v2i1 || VT == MVT::nxv2i1)
2044
2045
return EltSize != 8;
2045
- if( VT == MVT::v4i1 || VT == MVT::nxv4i1)
2046
+ if ( VT == MVT::v4i1 || VT == MVT::nxv4i1)
2046
2047
return EltSize != 4;
2047
2048
if (VT == MVT::v8i1 || VT == MVT::nxv8i1)
2048
2049
return EltSize != 2;
@@ -5905,12 +5906,14 @@ SDValue AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
5905
5906
case Intrinsic::aarch64_sve_whilewr_h:
5906
5907
case Intrinsic::aarch64_sve_whilewr_s:
5907
5908
case Intrinsic::aarch64_sve_whilewr_d:
5908
- return DAG.getNode(AArch64ISD::WHILEWR, dl, Op.getValueType(), Op.getOperand(1), Op.getOperand(2));
5909
+ return DAG.getNode(AArch64ISD::WHILEWR, dl, Op.getValueType(),
5910
+ Op.getOperand(1), Op.getOperand(2));
5909
5911
case Intrinsic::aarch64_sve_whilerw_b:
5910
5912
case Intrinsic::aarch64_sve_whilerw_h:
5911
5913
case Intrinsic::aarch64_sve_whilerw_s:
5912
5914
case Intrinsic::aarch64_sve_whilerw_d:
5913
- return DAG.getNode(AArch64ISD::WHILERW, dl, Op.getValueType(), Op.getOperand(1), Op.getOperand(2));
5915
+ return DAG.getNode(AArch64ISD::WHILERW, dl, Op.getValueType(),
5916
+ Op.getOperand(1), Op.getOperand(2));
5914
5917
case Intrinsic::aarch64_neon_abs: {
5915
5918
EVT Ty = Op.getValueType();
5916
5919
if (Ty == MVT::i64) {
@@ -6377,34 +6380,38 @@ SDValue AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
6377
6380
uint64_t EltSize = Op.getOperand(3)->getAsZExtVal();
6378
6381
bool IsWriteAfterRead = Op.getOperand(4)->getAsZExtVal() == 1;
6379
6382
switch (EltSize) {
6380
- case 1:
6381
- IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_b : Intrinsic::aarch64_sve_whilerw_b;
6382
- break;
6383
- case 2:
6384
- IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_h : Intrinsic::aarch64_sve_whilerw_h;
6385
- break;
6386
- case 4:
6387
- IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_s : Intrinsic::aarch64_sve_whilerw_s;
6388
- break;
6389
- case 8:
6390
- IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_d : Intrinsic::aarch64_sve_whilerw_d;
6391
- break;
6392
- default:
6393
- llvm_unreachable("Unexpected element size for get.alias.lane.mask");
6394
- break;
6383
+ case 1:
6384
+ IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_b
6385
+ : Intrinsic::aarch64_sve_whilerw_b;
6386
+ break;
6387
+ case 2:
6388
+ IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_h
6389
+ : Intrinsic::aarch64_sve_whilerw_h;
6390
+ break;
6391
+ case 4:
6392
+ IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_s
6393
+ : Intrinsic::aarch64_sve_whilerw_s;
6394
+ break;
6395
+ case 8:
6396
+ IntrinsicID = IsWriteAfterRead ? Intrinsic::aarch64_sve_whilewr_d
6397
+ : Intrinsic::aarch64_sve_whilerw_d;
6398
+ break;
6399
+ default:
6400
+ llvm_unreachable("Unexpected element size for get.alias.lane.mask");
6401
+ break;
6395
6402
}
6396
6403
}
6397
- SDValue ID =
6398
- DAG.getTargetConstant(IntrinsicID, dl, MVT::i64);
6404
+ SDValue ID = DAG.getTargetConstant(IntrinsicID, dl, MVT::i64);
6399
6405
6400
6406
EVT VT = Op.getValueType();
6401
6407
if (VT.isScalableVector())
6402
6408
return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, VT, ID, Op.getOperand(1),
6403
6409
Op.getOperand(2));
6404
6410
6405
- // We can use the SVE whilelo/whilewr/whilerw instruction to lower this intrinsic by
6406
- // creating the appropriate sequence of scalable vector operations and
6407
- // then extracting a fixed-width subvector from the scalable vector.
6411
+ // We can use the SVE whilelo/whilewr/whilerw instruction to lower this
6412
+ // intrinsic by creating the appropriate sequence of scalable vector
6413
+ // operations and then extracting a fixed-width subvector from the scalable
6414
+ // vector.
6408
6415
6409
6416
EVT ContainerVT = getContainerForFixedLengthVector(DAG, VT);
6410
6417
EVT WhileVT = ContainerVT.changeElementType(MVT::i1);
@@ -19544,7 +19551,8 @@ static bool isPredicateCCSettingOp(SDValue N) {
19544
19551
// get_active_lane_mask is lowered to a whilelo instruction.
19545
19552
N.getConstantOperandVal(0) == Intrinsic::get_active_lane_mask ||
19546
19553
// get_alias_lane_mask is lowered to a whilewr/rw instruction.
19547
- N.getConstantOperandVal(0) == Intrinsic::experimental_get_alias_lane_mask)))
19554
+ N.getConstantOperandVal(0) ==
19555
+ Intrinsic::experimental_get_alias_lane_mask)))
19548
19556
return true;
19549
19557
19550
19558
return false;
0 commit comments