[ValueTracking] Handle shl pair in isKnownNonEqual()
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 26 Mar 2021 19:16:57 +0000 (20:16 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 26 Mar 2021 19:21:05 +0000 (20:21 +0100)
commitfd7df0cf3873a0c9eef6cce4dab05551ff6e0e8d
treeb5e1353b5841b48a1f06eccccb53f47073259b27
parent9666e89d577887cf574507207484a066588fc9ca
[ValueTracking] Handle shl pair in isKnownNonEqual()

Handle (x << s) != (y << s) where x != y and the shifts are
non-wrapping. Once again, this establishes parity with the
corresponing mul fold that already exists. The shift case is
more powerful because we don't need to guard against multiplies
by zero.
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Analysis/ValueTracking/known-non-equal.ll