void HvxSelector::selectExtractSubvector(SDNode *N) {
SDValue Inp = N->getOperand(0);
MVT ResTy = N->getValueType(0).getSimpleVT();
+ auto IdxN = cast<ConstantSDNode>(N->getOperand(1));
+ unsigned Idx = IdxN->getZExtValue();
+#ifndef NDEBUG
MVT InpTy = Inp.getValueType().getSimpleVT();
assert(InpTy.getVectorElementType() == ResTy.getVectorElementType());
unsigned ResLen = ResTy.getVectorNumElements();
assert(2 * ResLen == InpTy.getVectorNumElements());
- auto IdxN = cast<ConstantSDNode>(N->getOperand(1));
- unsigned Idx = IdxN->getZExtValue();
assert(Idx == 0 || Idx == ResLen);
+#endif
unsigned SubReg = Idx == 0 ? Hexagon::vsub_lo : Hexagon::vsub_hi;
SDValue Ext = DAG.getTargetExtractSubreg(SubReg, SDLoc(N), ResTy, Inp);