[PATCH] D149407: [ValueTracking] Pull out logic for detecting if `(add X, Y)` is non-zero; NFC
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 08:01:19 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:2840
return true;
break;
}
----------------
nikic wrote:
> Can we directly return isNonZeroAdd?
No, we actually benefit from compute known bits. Take the following. `X[0] == 0` and `Y[0] == 1`. The result will be odd (from computeknownbits) so non-zero, but we don't get that here (would need to replicate computeknownnbits to do that).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149407/new/
https://reviews.llvm.org/D149407
More information about the llvm-commits
mailing list