[PATCH] D141060: [opt] Infer DataLayout from triple if not specified

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 16:00:25 PDT 2023


arichardson added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/rewrite-out-arguments.ll:487
 ; CHECK-LABEL: define {{[^@]+}}@void_one_out_arg_i32_1_use
-; CHECK-SAME: (ptr [[TMP0:%.*]]) #[[ATTR2:[0-9]+]] {
-; CHECK-NEXT:    [[TMP2:%.*]] = call [[VOID_ONE_OUT_ARG_I32_1_USE:%.*]] @void_one_out_arg_i32_1_use.body(ptr poison)
-; CHECK-NEXT:    [[TMP3:%.*]] = extractvalue [[VOID_ONE_OUT_ARG_I32_1_USE]] [[TMP2]], 0
-; CHECK-NEXT:    store i32 [[TMP3]], ptr [[TMP0]], align 4
+; CHECK-SAME: (ptr [[VAL:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT:    store i32 0, ptr [[VAL]], align 4
----------------
arsenm wrote:
> arichardson wrote:
> > I'm not quite sure what is going on in this test, it seems like the correct datalayout is causing a huge difference.
> This was expecting the pointer type to match the address space, so the transform didn't happen. these need to get all addrspace(5)s
Uploaded this change as https://github.com/llvm/llvm-project/pull/70269.


================
Comment at: llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i8.ll:31
+;
+; R600-LABEL: @test_atomicrmw_xchg_i8_global_agent(
+; R600-NEXT:    [[ALIGNEDADDR:%.*]] = call ptr addrspace(1) @llvm.ptrmask.p1.i32(ptr addrspace(1) [[PTR:%.*]], i32 -4)
----------------
arsenm wrote:
> arichardson wrote:
> > i32 vs i64 change so I had to use a different prefix
> use multiple prefixes? Also seems wrong that r600 would still be using A0
Updated to use GCN/R600 prefix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141060



More information about the llvm-commits mailing list