[PATCH] D96440: [knownbits] Preserve known bits for small shift recurrences
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 23:06:48 PST 2021
aqjune added a comment.
> One specific question to reviewers. This patch essentially treats all shifts as if they were not exact/nsw/nuw. This is a valid interpretation, but I'm concerned it might differ from that taken elsewhere in the optimizer in a problematic way. What is the best practice for this in known bits computation?
I think this is okay because IIUC analyses in ValueTracking (computeKnownXX/isKnownXX) can answer anything if the value was poison.
For example, isGEPKnownNonNull(I) is returning true if I = `gep inbounds X, ofs` where ofs > 0.
Users of the analyses should assume that the value can be poison; this is consistent with the recent change in the definition of nonnull/align attribute.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96440/new/
https://reviews.llvm.org/D96440
More information about the llvm-commits
mailing list