[PATCH] D80621: [CodeGen] Fix warnings in LowerToPredicatedOp
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 27 04:17:20 PDT 2020
david-arm created this revision.
david-arm added reviewers: sdesmalen, kmclaughlin, ctetreau.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
When creating a new vector type based on another vector type we
should pass in the element count instead of the number of elements
and scalable flag separately.
I encountered this warning whilst compiling this test:
CodeGen/AArch64/sve-intrinsics-int-compares.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80621
Files:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -7718,8 +7718,8 @@
Op.getOperand(1).getValueType().isScalableVector() &&
"Only scalable vectors are supported");
- auto PredTy = VT.getVectorVT(*DAG.getContext(), MVT::i1,
- VT.getVectorNumElements(), true);
+ auto PredTy =
+ VT.getVectorVT(*DAG.getContext(), MVT::i1, VT.getVectorElementCount());
SDValue Mask = getPTrue(DAG, DL, PredTy, AArch64SVEPredPattern::all);
SmallVector<SDValue, 4> Operands = {Mask};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80621.266482.patch
Type: text/x-patch
Size: 708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200527/276479fb/attachment.bin>
More information about the llvm-commits
mailing list