spaits wrote: > > and x (sub 0, y) -> andn x y > > This seems completely wrong since they calculate different results. Perhaps you meant "and x (sub **-1**, y) -> andn x y"?? Yes you are right. Sorry for my mistake. https://github.com/llvm/llvm-project/pull/129253