[llvm] [InstCombine] Improve select simplification based on known bits (PR #97289)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 07:03:15 PDT 2024


nikic wrote:

Unoptimized IR for one of the problematic cases: https://llvm.godbolt.org/z/evx3zvMEc

Originally, the select true value was folded to a xor with sign mask. When we thread the icmp eq over the select it becomes a simple icmp. Instead demanded bits simplification now replaces the xor with an and and then shrinks it.

Let me try disabling that particular fold and see if it is improves things...

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


More information about the llvm-commits mailing list