[llvm] AtomicExpand: Fix creating invalid ptrmask for fat pointers (PR #94955)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 03:42:20 PDT 2024


================
@@ -1262,6 +1262,110 @@ define bfloat @test_atomicrmw_xchg_bf16_global_agent_align4(ptr addrspace(1) %pt
   ret bfloat %res
 }
 
+define i16 @test_atomicrmw_xchg_i16_buffer_fat_agent(ptr addrspace(7) %ptr, i16 %value) {
+; CHECK-LABEL: @test_atomicrmw_xchg_i16_buffer_fat_agent(
+; CHECK-NEXT:    [[ALIGNEDADDR:%.*]] = call ptr addrspace(7) @llvm.ptrmask.p7.i32(ptr addrspace(7) [[PTR:%.*]], i32 -4)
----------------
arsenm wrote:

Not sure this is really sensible. I'm surprised this is i32 and not i64, and since this is zero extended, this is probably nonsense 

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


More information about the llvm-commits mailing list