[PATCH] D110061: [SelectionDAG] Fix PromoteIntOp_EXTRACT_SUBVECTOR for scalable vectors.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 20 03:57:03 PDT 2021
sdesmalen created this revision.
Herald added subscribers: ctetreau, ecnelises, hiraditya, kristof.beyls.
sdesmalen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This seemed like an obvious fix, but I wasn't able to write a test for
this for AArch64 SVE. Any suggestions for a test are welcome.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110061
Files:
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -5098,7 +5098,7 @@
SDValue V0 = GetPromotedInteger(N->getOperand(0));
MVT InVT = V0.getValueType().getSimpleVT();
MVT OutVT = MVT::getVectorVT(InVT.getVectorElementType(),
- N->getValueType(0).getVectorNumElements());
+ N->getValueType(0).getVectorElementCount());
SDValue Ext = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, OutVT, V0, N->getOperand(1));
return DAG.getNode(ISD::TRUNCATE, dl, N->getValueType(0), Ext);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110061.373546.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210920/02a8e4ea/attachment.bin>
More information about the llvm-commits
mailing list