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

[InstSimplify] with logical ops: (X & Y) == -1 ? X : -1 --> -1

Use simplifySelectWithICmpEq to handle the implied equalities from the icmp-and,
then both of ICMP_NE and ICMP_EQ will be addressed including vector type.
    (X & Y) == -1 ?  X : -1 --> -1 (commuted 2 ways)
    (X & Y) != -1 ? -1 :  X --> -1 (commuted 2 ways)
This is a supplement to the icmp-or scenario on D148986.

Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D149229
parent 0f28cecf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment