From 8f071fecfe0bbf1ddfc3e2ca024ad6fa3aa024f0 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 28 Nov 2022 10:24:47 -0500 Subject: [PATCH] AMDGPU: Use named values in a test As always, these were an obstacle to test updates. --- llvm/test/CodeGen/AMDGPU/fence-barrier.ll | 288 +++++++++++----------- 1 file changed, 146 insertions(+), 142 deletions(-) diff --git a/llvm/test/CodeGen/AMDGPU/fence-barrier.ll b/llvm/test/CodeGen/AMDGPU/fence-barrier.ll index 8f5a06d01fa2..106c88be38ae 100644 --- a/llvm/test/CodeGen/AMDGPU/fence-barrier.ll +++ b/llvm/test/CodeGen/AMDGPU/fence-barrier.ll @@ -10,46 +10,48 @@ declare void @llvm.amdgcn.s.barrier() @test_local.temp = internal addrspace(3) global [1 x i32] undef, align 4 @test_global_local.temp = internal addrspace(3) global [1 x i32] undef, align 4 + ; GCN-LABEL: {{^}}test_local ; GCN: v_mov_b32_e32 v[[VAL:[0-9]+]], 0x777 ; GCN: ds_write_b32 v{{[0-9]+}}, v[[VAL]] ; GCN: s_waitcnt lgkmcnt(0){{$}} ; GCN-NEXT: s_barrier ; GCN: flat_store_dword -define amdgpu_kernel void @test_local(i32 addrspace(1)*) { - %2 = alloca i32 addrspace(1)*, align 4, addrspace(5) - store i32 addrspace(1)* %0, i32 addrspace(1)* addrspace(5)* %2, align 4 - %3 = call i32 @llvm.amdgcn.workitem.id.x() - %4 = zext i32 %3 to i64 - %5 = icmp eq i64 %4, 0 - br i1 %5, label %6, label %7 +define amdgpu_kernel void @test_local(i32 addrspace(1)* %arg) { +bb: + %i = alloca i32 addrspace(1)*, align 4, addrspace(5) + store i32 addrspace(1)* %arg, i32 addrspace(1)* addrspace(5)* %i, align 4 + %i1 = call i32 @llvm.amdgcn.workitem.id.x() + %i2 = zext i32 %i1 to i64 + %i3 = icmp eq i64 %i2, 0 + br i1 %i3, label %bb4, label %bb5 -;