[ValueTracking] Add logic for `fshl/fshr(A, B, C) != 0` if `A == B && A ! = 0`
authorNoah Goldstein <goldstein.w.n@gmail.com>
Fri, 28 Apr 2023 06:18:20 +0000 (01:18 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Fri, 28 Apr 2023 06:57:37 +0000 (01:57 -0500)
commit4cd1b67491df2fc927057feb567db8e418e28d80
tree75ab6c440f30a59bd3bfc4cbfd7a6d74e7f42e59
parent74157bf6e2258142e5222cf8b86767e8daa46436
[ValueTracking] Add logic for `fshl/fshr(A, B, C) != 0` if `A == B && A ! = 0`

Having `A == B` is quite common for rotate patterns.

Alive2 Links:
    - https://alive2.llvm.org/ce/z/mPXi9c
    - https://alive2.llvm.org/ce/z/UfDHoI

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D149372
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Analysis/ValueTracking/known-non-zero.ll