HomePhabricator

Add recursive decomposition reasoning to isKnownNonEqual

Authored by reames on Dec 5 2020, 3:57 PM.

Description

Add recursive decomposition reasoning to isKnownNonEqual

The basic idea is that by looking through operand instructions which don't change the equality result that we can push the existing known bits comparison down past instructions which would obscure them.

We have analogous handling in InstSimplify for most - though weirdly not all - of these cases starting from an icmp root. It's a bit unfortunate to duplicate logic, but since my actual goal is to extend BasicAA, the icmp logic doesn't help. (And just makes it hard to test here.) The BasicAA change will be posted separately for review.

Differential Revision: https://reviews.llvm.org/D92698