[PATCH] D58927: [ARM] Fixed an assumption of power-of-2 vector MVT
Tim Renouf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 15:17:45 PST 2019
tpr created this revision.
Herald added subscribers: llvm-commits, kristof.beyls, javed.absar.
Herald added a project: LLVM.
I am about to introduce some non-power-of-2 width vector MVTs. This
commit fixes a power-of-2 assumption that my forthcoming change would
otherwise break.
Change-Id: I56a282e365d3874ab0621e5bdef98a612f702317
Repository:
rL LLVM
https://reviews.llvm.org/D58927
Files:
lib/Target/ARM/ARMISelLowering.cpp
Index: lib/Target/ARM/ARMISelLowering.cpp
===================================================================
--- lib/Target/ARM/ARMISelLowering.cpp
+++ lib/Target/ARM/ARMISelLowering.cpp
@@ -12150,7 +12150,7 @@
MVT IntTy = N->getSimpleValueType(0).getVectorElementType();
uint32_t IntBits = IntTy.getSizeInBits();
unsigned NumLanes = Op.getValueType().getVectorNumElements();
- if (FloatBits != 32 || IntBits > 32 || NumLanes > 4) {
+ if (FloatBits != 32 || IntBits > 32 || NumLanes > 4 || NumLanes == 3) {
// These instructions only exist converting from f32 to i32. We can handle
// smaller integers by generating an extra truncate, but larger ones would
// be lossy. We also can't handle more then 4 lanes, since these intructions
@@ -12208,7 +12208,7 @@
MVT IntTy = Op.getOperand(0).getSimpleValueType().getVectorElementType();
uint32_t IntBits = IntTy.getSizeInBits();
unsigned NumLanes = Op.getValueType().getVectorNumElements();
- if (FloatBits != 32 || IntBits > 32 || NumLanes > 4) {
+ if (FloatBits != 32 || IntBits > 32 || NumLanes > 4 || NumLanes == 3) {
// These instructions only exist converting from i32 to f32. We can handle
// smaller integers by generating an extra extend, but larger ones would
// be lossy. We also can't handle more then 4 lanes, since these intructions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58927.189214.patch
Type: text/x-patch
Size: 1345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190304/b2f4ac45/attachment-0001.bin>
More information about the llvm-commits
mailing list