andjo403 wrote: what I can see many of the regressions in llvm-opt-benchmark is that `icmp ne (and x, 1), 0` is not folded to `trunc x to i1` but the fold from this PR is one of the reasons for regressions for that fold. https://github.com/llvm/llvm-project/pull/128861