[PATCH] D144381: [SCEV] Added a utility method that raising the number 2 to the desired power to SCEV

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 05:52:54 PST 2023


nikic added inline comments.


================
Comment at: llvm/include/llvm/Analysis/ScalarEvolution.h:661
+    assert(Power < getTypeSizeInBits(Ty) && "Power out of range");
+    auto Val = APInt::getZero(getTypeSizeInBits(Ty));
+    Val.setBit(Power);
----------------
`APInt::getOneBitSet()`.


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

https://reviews.llvm.org/D144381



More information about the llvm-commits mailing list