[PATCH] D68128: [InstCombine] Fold PHIs with equal incoming pointers
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 11:07:58 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp:1144-1155
+ for (Use &Incoming : PN.incoming_values()) {
+ if (!isa<Instruction>(Incoming))
+ return nullptr;
+ int64_t CurrentOffset;
+ bool IsCurrentInBounds = true;
+ Value *CurrentBase = GetPointerBaseWithConstantOffset(
+ Incoming, CurrentOffset, DL, /* AllowNonInbounds */ true,
----------------
This still looks like a hoisting problem to me, honestly.
In particular, why do we want *all* the incoming values to be identical?
I.e. why can't we track *which* values are identical,
and if there are two-or-more of of particular value hoist+common them?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68128/new/
https://reviews.llvm.org/D68128
More information about the llvm-commits
mailing list