[llvm] AlignmentFromAssumptions should not track the load result users (PR #73370)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 24 12:54:55 PST 2023
================
@@ -226,6 +223,8 @@ bool AlignmentFromAssumptionsPass::processAssumption(CallInst *ACall,
LI->setAlignment(NewAlignment);
++NumLoadAlignChanged;
}
+ // The user of a Load uses data - not a pointer!
+ AddUsers = false;
----------------
nikic wrote:
This fix looks very incomplete to me. We'll no longer follow users of loads, but still for everything else -- for example, what about a call that accepts and returns a pointer?
I believe we should explicitly listing the instructions for which we want to follow pointers, which are bitcasts, geps, selects and phis, and not anything else.
https://github.com/llvm/llvm-project/pull/73370
More information about the llvm-commits
mailing list