[llvm] [LLVM][AArch64] Enable verifyTargetSDNode for scalable vectors and fix the fallout. (PR #104820)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 09:21:23 PDT 2024
================
@@ -22667,7 +22672,19 @@ static SDValue trySimplifySrlAddToRshrnb(SDValue Srl, SelectionDAG &DAG,
SDValue Rshrnb = DAG.getNode(
AArch64ISD::RSHRNB_I, DL, ResVT,
{RShOperand, DAG.getTargetConstant(ShiftValue, DL, MVT::i32)});
- return DAG.getNode(ISD::BITCAST, DL, VT, Rshrnb);
+ return DAG.getNode(AArch64ISD::NVCAST, DL, VT, Rshrnb);
+}
+
+static SDValue isNVCastToHalfWidthElements(SDValue V) {
+ if (V.getOpcode() != AArch64ISD::NVCAST)
+ return SDValue();
+
+ SDValue Op = V.getOperand(0);
+ if (V.getValueType().getVectorElementCount() !=
+ Op.getValueType().getVectorElementCount() * 2)
+ return SDValue();
----------------
paulwalker-arm wrote:
`getValueType()` returns an EVT, which has no concept of tuple types. The call to `getVectorElementCount` itself will assert the EVT is a plain vector type.
https://github.com/llvm/llvm-project/pull/104820
More information about the llvm-commits
mailing list