[PATCH] D153505: [ConstantRange] Handle `Intrinsic::cttz` and `Intrinsic::ctpop`

Yingwei Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 00:54:30 PDT 2023


dtcxzyw created this revision.
dtcxzyw added reviewers: nikic, reames.
Herald added a subscriber: hiraditya.
Herald added a project: All.
dtcxzyw requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds support for `cttz` and `ctpop` intrinsics in ConstantRange. It calculates the range in `O(L)` where `L` is the bit width.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153505

Files:
  llvm/include/llvm/IR/ConstantRange.h
  llvm/lib/IR/ConstantRange.cpp
  llvm/test/Transforms/CorrelatedValuePropagation/range.ll
  llvm/unittests/IR/ConstantRangeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153505.533493.patch
Type: text/x-patch
Size: 10073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230622/9e2d086b/attachment.bin>


More information about the llvm-commits mailing list