[PATCH] D141060: [opt] Infer DataLayout from triple if not specified
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 25 03:03:11 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.defined.nobuiltin.ll:59
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[__SINCOS_:%.*]] = alloca float, align 4
-; CHECK-NEXT: [[TMP0:%.*]] = call contract float @_Z6sincosfPU3AS0f(float [[X]], ptr [[__SINCOS_]])
-; CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[__SINCOS_]], align 4
-; CHECK-NEXT: store float [[TMP0]], ptr addrspace(1) [[SIN_OUT]], align 4
+; CHECK-NEXT: [[__SINCOS_:%.*]] = alloca float, align 4, addrspace(5)
+; CHECK-NEXT: [[TMP0:%.*]] = addrspacecast ptr addrspace(5) [[__SINCOS_]] to ptr
----------------
arichardson wrote:
> This seems correct since it's now allocating in the alloca AS, but would be good to get a confirmation here.
Yes
================
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
----------------
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
================
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)
----------------
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
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