[PATCH] D103261: [AMDGPU] Increase alignment of LDS globals if necessary before LDS lowering.

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 12:34:01 PDT 2021


JonChesterfield added a comment.

Not really the right place for this comment, but better odds of it being seen than in other bug trackers. Mahesha reports:

@lds = addrspace(3) global float undef, align 8
@gptr = addrspace(1) global i64* addrspacecast (float addrspace(3)* @lds to i64*), align 8
@llvm.used = appending global [2 x i8*] [i8* addrspacecast (i8 addrspace(3)* bitcast (float addrspace(3)* @lds to i8 addrspace(3)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (i64* addrspace(1)* @gptr to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
define void @f0() {

  %ld = load i64*, i64* addrspace(1)* @gptr
  ret void

}

^ that doesn't get transformed, suggesting a bug in shouldLowerLDSToStruct. The pattern of return !F for conservative should probably be repeated where it currently has return false. I thought we had a test case for storing address of LDS in a global, but presumably not.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103261



More information about the llvm-commits mailing list