[PATCH] D96668: [BasicAA] Always strip single-argument phi nodes
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 11:55:01 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:399
+ StrippedInvariantGroupsArg = Intr->getArgOperand(0)->stripPointerCasts();
+ }
if (StrippedArg == StrippedInvariantGroupsArg)
----------------
jdoerfert wrote:
> we don't want to look through phi with one input?
It's okay to drop them (and InstCombine will do so independently). The reason why I changed this to not call `stripPointerCastsForAliasAnalysis()` is that on an abstract level, it's not obvious that the set of things that are legal to strip here, and legal to strip in alias analysis are always the same. So I wanted to limit this only to the transform described in the comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96668/new/
https://reviews.llvm.org/D96668
More information about the llvm-commits
mailing list