[InstCombine] adjust branch on logical-and fold
authorSanjay Patel <spatel@rotateright.com>
Mon, 31 Oct 2022 21:32:34 +0000 (17:32 -0400)
committerSanjay Patel <spatel@rotateright.com>
Mon, 31 Oct 2022 21:39:29 +0000 (17:39 -0400)
commit1f8ac37e2d50b0175225a0d8f3f5003f64b46b89
treecbd51bbfaae109d6bef800157e8c39b381191ada
parentaa887ff3f43aeaeb76d6be176d0ed67eb414eff8
[InstCombine] adjust branch on logical-and fold

The transform was just added with:
115d2f69a515cd756fa51
...but as noted in post-commit feedback, it was
confusingly coded. Now, we create the final
expected canonicalized form directly and put
an extra use check on the match, so we should
not ever end up with more instructions.
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/branch.ll