[llvm] [InstCombine] Reduce range of ctpop for non zero argument (PR #100899)

Pranav Kant via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 15:19:14 PDT 2024


pranavk wrote:

This seems to cause miscompiles for one of our Arm targets. Here's the reproducer:
https://godbolt.org/z/689eKhcnh

The problem seems to be the range attribute that doesn't contain "0" even though smax could return 0 in this case. This then combines with https://github.com/llvm/llvm-project/pull/111998/files which causes incorrect value of b on Arm machines.



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


More information about the llvm-commits mailing list