[llvm] AlignmentFromAssumptions should not track the load result users (PR #73370)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 11:58:58 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;
----------------
alex-t wrote:

Okay, what is about the rest of the pointer arithmetic? We need to be able to track down arbitrary long/wide sub-graph computing the address. So, the addition/subtraction/mul/div/shifts etc. should also be in a list.
I have no idea regarding the memory intrinsics yet, but for the calls that accept and return a pointer we probably need to follow only if the input and output pointers alias each other.

https://github.com/llvm/llvm-project/pull/73370


More information about the llvm-commits mailing list