[PATCH] D103880: [SDAG] Fix pow2 assumption when splitting vectors
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 10 16:59:03 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcfbb92441f17: [SDAG] Fix pow2 assumption when splitting vectors (authored by critson).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103880/new/
https://reviews.llvm.org/D103880
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -19370,7 +19370,9 @@
unsigned SplitSize = NearestPow2 / 2;
EVT SplitVT = EVT::getVectorVT(*DAG.getContext(),
InVT.getVectorElementType(), SplitSize);
- if (TLI.isTypeLegal(SplitVT)) {
+ if (TLI.isTypeLegal(SplitVT) &&
+ SplitSize + SplitVT.getVectorNumElements() <=
+ InVT.getVectorNumElements()) {
SDValue VecIn2 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, SplitVT, Vec,
DAG.getVectorIdxConstant(SplitSize, DL));
SDValue VecIn1 = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, SplitVT, Vec,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103880.351306.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210610/74ee8df2/attachment.bin>
More information about the llvm-commits
mailing list