[PATCH] D82218: [SVE] Remove calls to VectorType::getNumElements from AggressiveInstCombine

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 16:40:55 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG416a6a85b148: [SVE] Remove calls to VectorType::getNumElements from AggressiveInstCombine (authored by ctetreau).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82218/new/

https://reviews.llvm.org/D82218

Files:
  llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp


Index: llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
===================================================================
--- llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
+++ llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
@@ -291,7 +291,8 @@
   assert(Ty && !Ty->isVectorTy() && "Expect Scalar Type");
   if (auto *VTy = dyn_cast<VectorType>(V->getType())) {
     // FIXME: should this handle scalable vectors?
-    return FixedVectorType::get(Ty, VTy->getNumElements());
+    return FixedVectorType::get(Ty,
+                                cast<FixedVectorType>(VTy)->getNumElements());
   }
   return Ty;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82218.285788.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200814/b77a7765/attachment.bin>


More information about the llvm-commits mailing list