[llvm] [Instsimplify] lshr&icmp adds support for the or instruction (PR #69445)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 07:55:33 PDT 2023


nikic wrote:

I think we should do something along these lines instead: https://github.com/llvm/llvm-project/pull/69471 (Missing tests)

Basically, we have a bunch of cases where we know an operation can only make the value smaller or larger, and we currently handle the base cases only, but not any combinations. We *could* add special cases like the one introduced here, but this will miss many other possible combinations of monotonic operations. I think we are better off expressing this more generically.

https://github.com/llvm/llvm-project/pull/69445


More information about the llvm-commits mailing list