[PATCH] D142234: [ConstantRange] Handle `Intrinsic::ctlz`

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 05:29:41 PST 2023


nikic added a comment.

Can you please rerun update_test_checks.py on the CorrelatedPropagation/range.ll test? There should be some diffs there.

In D142234#4128565 <https://reviews.llvm.org/D142234#4128565>, @antoniofrighetto wrote:

> @nikic, rebased and removed the old test. Might be wrong, but it seems like `O2` is already handling the test case you suggested; whereas the latter one I previously suggested (the one with `if (n < 8 && n > 2) return 0;`, which can never happen) does not seem to be reduced to a `icmp`, `select`, `ret` as of now.

Right. It's not really important that individual pass tests aren't folded by `-O2`. One construct more complex cases that LVI can handle that InstCombine can't. It's just more straightforward to test the basic case.


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

https://reviews.llvm.org/D142234



More information about the llvm-commits mailing list