[SDAG] enhance sub->xor fold to ignore signbit
authorSanjay Patel <spatel@rotateright.com>
Mon, 11 Jul 2022 16:02:42 +0000 (12:02 -0400)
committerSanjay Patel <spatel@rotateright.com>
Mon, 11 Jul 2022 16:37:50 +0000 (12:37 -0400)
commitd0eec5f7e7874ecfdface473cd4718ac5e6e629e
treeb0dbda1fb716c96a0c2f5147271c1378b7523a99
parent835fd0679a14193c82c49b55297fdc049c05fa5a
[SDAG] enhance sub->xor fold to ignore signbit

As suggested in the post-commit feedback for D128123,
we can ease the mask constraint to ignore the MSB
(and make the code easier to read by adjusting the check).

https://alive2.llvm.org/ce/z/bbvqWv
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/sub1.ll