[llvm] AlignmentFromAssumptions should only track pointer operand users (PR #73370)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 2 07:08:29 PST 2023
================
@@ -267,11 +263,20 @@ bool AlignmentFromAssumptionsPass::processAssumption(CallInst *ACall,
// Now that we've updated that use of the pointer, look for other uses of
// the pointer to update.
Visited.insert(J);
- for (User *UJ : J->users()) {
- Instruction *K = cast<Instruction>(UJ);
- if (!Visited.count(K))
- WorkList.push_back(K);
- }
+ if (auto UJ = dyn_cast<User>(J))
----------------
nikic wrote:
You should perform the check on J, not U.getUser(). In that case you don't need all those StoreInst/LoadInst/MemIntrinsic checks.
https://github.com/llvm/llvm-project/pull/73370
More information about the llvm-commits
mailing list