[llvm] AlignmentFromAssumptions should only track pointer operand users (PR #73370)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 11:32:15 PST 2023
================
@@ -267,11 +263,19 @@ 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:
Instruction is a child class of User, so you don't need the dyn_cast.
https://github.com/llvm/llvm-project/pull/73370
More information about the llvm-commits
mailing list