[ValueTracking] Add additional cases for `isKnownNonZero(mul X, Y)`
authorNoah Goldstein <goldstein.w.n@gmail.com>
Sun, 30 Apr 2023 14:38:38 +0000 (09:38 -0500)
committerNoah Goldstein <goldstein.w.n@gmail.com>
Sun, 30 Apr 2023 15:06:46 +0000 (10:06 -0500)
commit5eedfff695868087452b3272a42fa1a22b5d610e
tree278f5b012f95f102979c84be02490b06d279c71b
parentd840391401735a2cd5be54c11e1806ef47df622d
[ValueTracking] Add additional cases for `isKnownNonZero(mul X, Y)`

If either `X` or `Y` is odd and the other is non-zero, the result is
non-zero.

Alive2 Link:
    https://alive2.llvm.org/ce/z/9V7-es

Reviewed By: nikic

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