Skip to content

Commit

Permalink
[Hexagon] Apply 7f06a58 to another copy of the same code
Browse files Browse the repository at this point in the history
  • Loading branch information
d0k committed Nov 25, 2022
1 parent 7f06a58 commit b89e0ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
Expand Up @@ -695,15 +695,16 @@ void HexagonDAGToDAGISel::SelectIntrinsicWOChain(SDNode *N) {
void HexagonDAGToDAGISel::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());
assert(ResTy.getSizeInBits() == 32);

auto IdxN = cast<ConstantSDNode>(N->getOperand(1));
unsigned Idx = IdxN->getZExtValue();
assert(Idx == 0 || Idx == ResLen);
#endif
unsigned SubReg = Idx == 0 ? Hexagon::isub_lo : Hexagon::isub_hi;
SDValue Ext = CurDAG->getTargetExtractSubreg(SubReg, SDLoc(N), ResTy, Inp);

Expand Down

0 comments on commit b89e0ac

Please sign in to comment.