[PATCH] D80826: [CodeGen][SVE] Replace deprecated calls in getCopyFromPartsVector()
Henry Kao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 16:25:07 PDT 2020
hkao13 updated this revision to Diff 267400.
hkao13 added a comment.
Removed ElementCount operator overloads and reverted getVectorElementCount() for case i8 -> <1 x i1>
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80826/new/
https://reviews.llvm.org/D80826
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -438,7 +438,10 @@
// vector widening case (e.g. <2 x float> -> <4 x float>). Extract the
// elements we want.
if (PartEVT.getVectorElementType() == ValueVT.getVectorElementType()) {
- assert(PartEVT.getVectorNumElements() > ValueVT.getVectorNumElements() &&
+ assert((PartEVT.getVectorElementCount().Min >
+ ValueVT.getVectorElementCount().Min) &&
+ (PartEVT.getVectorElementCount().Scalable ==
+ ValueVT.getVectorElementCount().Scalable) &&
"Cannot narrow, it would be a lossy transformation");
return DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, ValueVT, Val,
DAG.getVectorIdxConstant(0, DL));
@@ -448,7 +451,7 @@
if (ValueVT.getSizeInBits() == PartEVT.getSizeInBits())
return DAG.getNode(ISD::BITCAST, DL, ValueVT, Val);
- assert(PartEVT.getVectorNumElements() == ValueVT.getVectorNumElements() &&
+ assert(PartEVT.getVectorElementCount() == ValueVT.getVectorElementCount() &&
"Cannot handle this kind of promotion");
// Promoted vector extract
return DAG.getAnyExtOrTrunc(Val, DL, ValueVT);
@@ -461,7 +464,7 @@
TLI.isTypeLegal(ValueVT))
return DAG.getNode(ISD::BITCAST, DL, ValueVT, Val);
- if (ValueVT.getVectorNumElements() != 1) {
+ if (ValueVT.getVectorElementCount().Min != 1) {
// Certain ABIs require that vectors are passed as integers. For vectors
// are the same size, this is an obvious bitcast.
if (ValueVT.getSizeInBits() == PartEVT.getSizeInBits()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80826.267400.patch
Type: text/x-patch
Size: 1794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200529/7f54a864/attachment.bin>
More information about the llvm-commits
mailing list