[GVN] Use m_LogicalAnd/Or to propagate equality from branch conditions
authorJuneyoung Lee <aqjune@gmail.com>
Sun, 27 Dec 2020 18:46:28 +0000 (03:46 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Sun, 27 Dec 2020 20:28:38 +0000 (05:28 +0900)
commitf1d648b973d32ab0e70ef20efb0f146240e50f58
tree2dbfb9767f12a0e3463d6246b5309b42c937b8fe
parent0060f1013453d4ecaac8b62fb54044285a16a379
[GVN] Use m_LogicalAnd/Or to propagate equality from branch conditions

This patch makes GVN recognize `select c1, c2, false` as well as `select c1, true, c2`
branch condition and propagate equality from these.

See llvm.org/pr48353, D93065

Differential Revision: https://reviews.llvm.org/D93841
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/test/Transforms/GVN/condprop.ll