[PATCH] D149419: [ValueTracking] Slight refactor to avoid unnecessary work; NFC
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 00:33:42 PDT 2023
nikic added a comment.
> In cases of Op0 != 0 || Op1 != 0 its better check Op1 first as its more likely to be a constant due to canonicalization (so faster to get knownbits of).
I'm not sure this is right: If Op1 is constant, then isKnownNonZero will in practice always return true, because the zero cases get folded away. So we do the call on Op0 anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149419/new/
https://reviews.llvm.org/D149419
More information about the llvm-commits
mailing list