[PATCH] D70392: [Attributor] Track a GEP Instruction in align deduction

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 07:16:11 PST 2019


uenoku marked an inline comment as done.
uenoku added inline comments.


================
Comment at: llvm/test/Transforms/FunctionAttrs/align.ll:352-359
+; FXIME: %p should have nonnull
+; ATTRIBUTOR: define i64 @test12-2(i32* nocapture nofree readonly align 16 %p)
+define i64 @test12-2(i32* align 4 %p) {
+  %p-cast = bitcast i32* %p to i64*
+  %arrayidx0 = getelementptr i64, i64* %p-cast, i64 0
+  %ret = load i64, i64* %arrayidx0, align 16
+  ret i64 %ret
----------------
lebedev.ri wrote:
> Is there test coverage where this is a `store` instead of `load`,
> and maybe there is a call to a function that expects certain aliment of it's pointer argument?
Thank you for the comment. I added tests for store(12-3, 12-4) and call(12-5, 12-6).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70392/new/

https://reviews.llvm.org/D70392





More information about the llvm-commits mailing list