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

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 14:06:41 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG56e4888627b3: [SVE] Remove calls to getBitWidth from Analysis (authored by ctetreau).

Repository:
  rG LLVM Github Monorepo

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

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
@@ -632,9 +632,9 @@
       // Assume unsigned elements
       isSigned = false;
 
-      // The max required size is the total vector width divided by num
-      // of elements in the vector
-      unsigned MaxRequiredSize = VT->getBitWidth() / VT->getNumElements();
+      // The max required size is the size of the vector element type
+      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.258838.patch
Type: text/x-patch
Size: 795 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200420/d689f45b/attachment.bin>


More information about the llvm-commits mailing list