[InstSimplify] fold selects where true/false arm is the same as condition
authorSanjay Patel <spatel@rotateright.com>
Fri, 30 Dec 2022 13:47:51 +0000 (08:47 -0500)
committerSanjay Patel <spatel@rotateright.com>
Fri, 30 Dec 2022 13:54:09 +0000 (08:54 -0500)
commit6c232db2ae933ad8f53cc39c8387fdceef7e8542
tree3601fb77e885756bb5ce3e2149db23ec9733dd67
parent94944f800c1242e0375b4a658820a366445e7bc1
[InstSimplify] fold selects where true/false arm is the same as condition

We managed to fold related patterns in issue #59704,
but we were missing these more basic folds:
https://alive2.llvm.org/ce/z/y6d7SN
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/select-logical.ll