[PATCH] D83196: [CodeGen] Fix a warning in DAGTypeLegalizer::SetSplitVector

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 12:53:24 PDT 2020


david-arm created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.

This fixes up one warning in the test:

  sve-sext-zext.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83196

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
@@ -836,8 +836,8 @@
                                       SDValue Hi) {
   assert(Lo.getValueType().getVectorElementType() ==
          Op.getValueType().getVectorElementType() &&
-         2*Lo.getValueType().getVectorNumElements() ==
-         Op.getValueType().getVectorNumElements() &&
+         Lo.getValueType().getVectorElementCount() * 2 ==
+         Op.getValueType().getVectorElementCount() &&
          Hi.getValueType() == Lo.getValueType() &&
          "Invalid type for split vector");
   // Lo/Hi may have been newly allocated, if so, add nodeid's as relevant.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83196.275603.patch
Type: text/x-patch
Size: 804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200706/313c2083/attachment.bin>


More information about the llvm-commits mailing list