Skip to content
Commit b80f31c4 authored by Zhongyunde's avatar Zhongyunde
Browse files

[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
parent 9d92f479
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment