[PATCH] D80615: [CodeGen] Fix warnings in getPackedVectorTypeFromPredicateType
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 2 23:25:48 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe602cd878e30: [CodeGen] Fix warnings in getPackedVectorTypeFromPredicateType (authored by david-arm).
Repository:
rG LLVM Github Monorepo
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.268064.patch
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200603/f28fef2b/attachment.bin>
More information about the llvm-commits
mailing list