[PATCH] D97074: Add getDemandedBits for uses.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 14:50:38 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Analysis/DemandedBits.cpp:465
+
+  unsigned BitWidth = T->getScalarSizeInBits();
+
----------------
qunyanm wrote:
> RKSimon wrote:
> > Could this be used in the APInt::getAllOnesValue() above instead of the getTypeSizeInBits call?
> Yes. Thanks!
Hmm - what about
```
unsigned BitWidth = DL.getTypeSizeInBits(T->getScalarType());
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97074



More information about the llvm-commits mailing list