[InstCombine] Fold icmp (select c,const,arg), null if icmp arg, null can be simplified
authorJuneyoung Lee <aqjune@gmail.com>
Mon, 21 Jun 2021 07:50:54 +0000 (16:50 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Mon, 21 Jun 2021 08:39:05 +0000 (17:39 +0900)
commitc038845f58a84f03c88a03ab6a59014b3d6c180b
treecfdb29d38785fcb18e715c985c439958ab264ce8
parent342bbb7832b69cc2adba9acaac0ed2b9bffbe896
[InstCombine] Fold icmp (select c,const,arg), null if icmp arg, null can be simplified

This patch folds icmp (select c,const,arg), null if icmp arg, null can be simplified.

Resolves llvm.org/pr48975.

Reviewed By: nikic, xbolva00

Differential Revision: https://reviews.llvm.org/D96663
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/assume-icmp-null-select.ll [new file with mode: 0644]