[InstSimplify] with logical ops: (X | Y) ? 0 : X --> 0
Use simplifySelectWithICmpEq to handle the implied equalities from the icmp-or, then both of ICMP_NE and ICMP_EQ will be addressed (X | Y) == 0 ? X : 0 --> 0 (commuted 2 ways) (X | Y) != 0 ? 0 : X --> 0 (commuted 2 ways) Fixes https://github.com/llvm/llvm-project/issues/62263 Reviewed By: nikic, RKSimon Differential Revision: https://reviews.llvm.org/D148986
Loading
Please sign in to comment