Skip to content

Commit ead2b6d

Browse files
- Guard setOperationAction with hasSVE2p1 & add assert
1 parent fa4d5b7 commit ead2b6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,8 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
15011501
setOperationAction(ISD::GET_ACTIVE_LANE_MASK, VT, Legal);
15021502
}
15031503

1504-
setOperationAction(ISD::GET_ACTIVE_LANE_MASK, MVT::nxv32i1, Custom);
1504+
if (Subtarget->hasSVE2p1())
1505+
setOperationAction(ISD::GET_ACTIVE_LANE_MASK, MVT::nxv32i1, Custom);
15051506

15061507
for (auto VT : {MVT::v16i8, MVT::v8i8, MVT::v4i16, MVT::v2i32})
15071508
setOperationAction(ISD::GET_ACTIVE_LANE_MASK, VT, Custom);
@@ -27332,8 +27333,8 @@ void AArch64TargetLowering::ReplaceExtractSubVectorResults(
2733227333

2733327334
void AArch64TargetLowering::ReplaceGetActiveLaneMaskResults(
2733427335
SDNode *N, SmallVectorImpl<SDValue> &Results, SelectionDAG &DAG) const {
27335-
if (!Subtarget->hasSVE2p1())
27336-
return;
27336+
assert(Subtarget->hasSVE2p1() &&
27337+
"Custom lower of get.active.lane.mask missing required feature.");
2733727338

2733827339
assert(N->getValueType(0) == MVT::nxv32i1 &&
2733927340
"Unexpected result type for get.active.lane.mask");

0 commit comments

Comments
 (0)