[llvm] [InstCombine] Improve `(icmp pred (and X, Y), ...)` fold. (PR #66787)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 06:33:08 PST 2023


nikic wrote:

Only looked at the first three commits, which imho could be a separate PR (maybe drop the rest from this one for now).

I think after adding getFreeInverted() it would be good to also go through existing users of isFreeToInvert() and replace them with getFreeInverted() where this is easy, e.g. in foldICmpOrXX(). Directly creating the inverted op instead of letting it get inverted separately does seem a lot more robust to me. 

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


More information about the llvm-commits mailing list