[PATCH] D76886: [InlineFunction] Disable emission of alignment assumptions by default

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 12:56:48 PDT 2020


rampitec added a comment.

In D76886#2008383 <https://reviews.llvm.org/D76886#2008383>, @lebedev.ri wrote:

> In D76886#2008279 <https://reviews.llvm.org/D76886#2008279>, @arsenm wrote:
>
> > Don't we have a less cumbersome way to test for alignment?
>
>
> That is the current canonical alignment assumption, at least until the attribute bundles are here.
>
> > The ptrtoint inhibits SROA.
>
> That issue seems not entirely new to these changes.
>  Is there a bug with reproducer?


Yes:

  ; RUN: opt -S -O3 < %s | FileCheck %s
  
  ; CHECK: @caller
  ; CHECK-NOT: alloca
  ; CHECK-NEXT: ret void
  
  target datalayout = "e-p:64:64-p5:32:32-A5"
  
  define amdgpu_kernel void @caller() {
    %alloca = alloca i64, align 8, addrspace(5)
    %cast = addrspacecast i64 addrspace(5)* %alloca to i64*
    call void @callee(i64* sret align 8 %cast)
    ret void
  }
  
  define internal void @callee(i64* noalias sret align 8 %arg) {
    store i64 0, i64* %arg, align 8
    ret void
  }




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

https://reviews.llvm.org/D76886





More information about the llvm-commits mailing list