[PATCH] D144410: [InstCombine] Support noalias calls in foldAllocaCmp()
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 12:06:57 PST 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:6458
+ if (isNoAliasCall(UO))
+ return isKnownNonZero(UO, Q.DL, /*Depth*/ 0, Q.AC, &I, Q.DT) ||
+ (UO == Op &&
----------------
goldstein.w.n wrote:
> Maybe cache these in an optional so the second call to `canFold` doesn't need to recompute?
These can't be easily cached because they may work on different values (underlying object vs plain operand).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144410/new/
https://reviews.llvm.org/D144410
More information about the llvm-commits
mailing list