[PATCH] D77898: [SVE] Remove calls to getBitWidth from Analysis

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 13:59:00 PDT 2020


ctetreau created this revision.
Herald added subscribers: llvm-commits, psnobl, rkruppe, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77898

Files:
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h


Index: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
===================================================================
--- llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
+++ llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
@@ -637,7 +637,8 @@
 
       // The max required size is the total vector width divided by num
       // of elements in the vector
-      unsigned MaxRequiredSize = VT->getBitWidth() / VT->getNumElements();
+      unsigned MaxRequiredSize =
+          VT->getElementType()->getPrimitiveSizeInBits().getFixedSize();
 
       unsigned MinRequiredSize = 0;
       for(unsigned i = 0, e = VT->getNumElements(); i < e; ++i) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77898.256647.patch
Type: text/x-patch
Size: 663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200410/6a6067d5/attachment.bin>


More information about the llvm-commits mailing list