[PATCH] D81927: [CodeGen] Fix warnings in getVectorElementCount()
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 16 04:24:29 PDT 2020
david-arm created this revision.
david-arm added reviewers: sdesmalen, ctetreau, fpetrogalli.
Herald added subscribers: llvm-commits, kristof.beyls.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
In EVT::getVectorElementCount() when the type is not simple we
should return getExtendedVectorElementCount() from the function
instead of constructing the ElementCount object manually.
I discovered this warning in an existing test:
test/CodeGen/AArch64/sve-intrinsics-loads.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81927
Files:
llvm/include/llvm/CodeGen/ValueTypes.h
Index: llvm/include/llvm/CodeGen/ValueTypes.h
===================================================================
--- llvm/include/llvm/CodeGen/ValueTypes.h
+++ llvm/include/llvm/CodeGen/ValueTypes.h
@@ -299,7 +299,7 @@
if (isSimple())
return V.getVectorElementCount();
- return {getExtendedVectorNumElements(), isExtendedScalableVector()};
+ return getExtendedVectorElementCount();
}
/// Given a vector type, return the minimum number of elements it contains.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81927.271041.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200616/b447a69f/attachment.bin>
More information about the llvm-commits
mailing list