[InstCombine] support fold select(X|Y,X|Y,X) to X|Y
Fixed: https://github.com/llvm/llvm-project/issues/62113 Add addtional check in `visitSelectInst` to: 1. match `select(X|Y==0, X, X|Y)` and replaced with `X|Y` 2. match `select(X&Y==-1, X, X&Y)` and replaced with `X&Y` alive proof: https://alive2.llvm.org/ce/z/4qHmv- https://alive2.llvm.org/ce/z/c2MBGy Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D148275
Loading
Please sign in to comment