[PATCH] D80615: [CodeGen] Fix warnings in getPackedVectorTypeFromPredicateType
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 00:29:35 PDT 2020
david-arm updated this revision to Diff 267552.
david-arm edited the summary of this revision.
Herald added a subscriber: kristof.beyls.
Herald added a reviewer: rengolin.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80615/new/
https://reviews.llvm.org/D80615
Files:
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
Index: llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
@@ -4625,13 +4625,13 @@
if (!PredVT.isScalableVector() || PredVT.getVectorElementType() != MVT::i1)
return EVT();
- const unsigned NumElts = PredVT.getVectorNumElements();
-
- if (NumElts != 2 && NumElts != 4 && NumElts != 8 && NumElts != 16)
+ if (PredVT != MVT::nxv16i1 && PredVT != MVT::nxv8i1 &&
+ PredVT != MVT::nxv4i1 && PredVT != MVT::nxv2i1)
return EVT();
- EVT ScalarVT = EVT::getIntegerVT(Ctx, AArch64::SVEBitsPerBlock / NumElts);
- EVT MemVT = EVT::getVectorVT(Ctx, ScalarVT, NumElts, /*IsScalable=*/true);
+ ElementCount EC = PredVT.getVectorElementCount();
+ EVT ScalarVT = EVT::getIntegerVT(Ctx, AArch64::SVEBitsPerBlock / EC.Min);
+ EVT MemVT = EVT::getVectorVT(Ctx, ScalarVT, EC);
return MemVT;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80615.267552.patch
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200601/fee87969/attachment.bin>
More information about the llvm-commits
mailing list