This patch does the following simplification: ``` sel1 = select cond1, X, Y sel2 = select cond2, sel1, Z --> sel2 = select cond2, X, Z if cond2 implies cond1 sel2 = select cond2, Y, Z if cond2 implies !cond1 ``` Alive2: https://alive2.llvm.org/ce/z/9A_arU It cannot be done in CVP/SCCP since we should guarantee that `cond2` is not an undef.
33 KiB
33 KiB