Skip to content

Commit 6a06f3e

Browse files
committed
Revert "Convert tests to use -emit-opaque-pointers (#2084)"
This reverts commit 6a57011.
1 parent 6e4f663 commit 6a06f3e

40 files changed

+554
-467
lines changed

llvm-spirv/test/SamplerArgNonKernel.ll

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
; RUN: llvm-as %s -o %t.bc
2-
; RUN: llvm-spirv %t.bc -spirv-text -o %t.txt
1+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
2+
; RUN: llvm-spirv %t.bc -opaque-pointers=0 -spirv-text -o %t.txt
33
; RUN: FileCheck < %t.txt %s
44
target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
55
target triple = "spir"
66

77
;CHECK: EntryPoint {{[0-9]+}} [[KernelId:[0-9]+]]
88

9+
%opencl.image2d_t = type opaque
910
;CHECK: TypeImage [[image2d_t:[0-9]+]]
1011
;CHECK: TypeSampler [[sampler_t:[0-9]+]]
1112
;CHECK: TypeSampledImage [[sampled_image_t:[0-9]+]]
1213

1314
; Function Attrs: nounwind
14-
define spir_func float @test(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 0) %Img, i32 %Smp) #0 {
15+
define spir_func float @test(%opencl.image2d_t addrspace(1)* %Img, i32 %Smp) #0 {
1516
;CHECK-NOT: Function {{[0-9]+}} [[KernelId]]
1617
;CHECK: Function
1718
;CHECK: FunctionParameter [[image2d_t]] [[image:[0-9]+]]
1819
;CHECK: FunctionParameter [[sampler_t]] [[sampler:[0-9]+]]
1920
entry:
20-
%call = call spir_func <4 x i32> @_Z11read_imagef11ocl_image2d11ocl_samplerDv2_i(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 0) %Img, i32 %Smp, <2 x i32> zeroinitializer)
21+
%call = call spir_func <4 x i32> @_Z11read_imagef11ocl_image2d11ocl_samplerDv2_i(%opencl.image2d_t addrspace(1)* %Img, i32 %Smp, <2 x i32> zeroinitializer)
2122
;CHECK: SampledImage [[sampled_image_t]] [[sampled_image:[0-9]+]] [[image]] [[sampler]]
2223
;CHECK: ImageSampleExplicitLod {{[0-9]+}} {{[0-9]+}} [[sampled_image]] {{[0-9]+}} {{[0-9]+}} {{[0-9]+}}
2324

@@ -26,13 +27,13 @@ entry:
2627
ret float %conv
2728
}
2829

29-
declare spir_func <4 x i32> @_Z11read_imagef11ocl_image2d11ocl_samplerDv2_i(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 0), i32, <2 x i32>) #1
30+
declare spir_func <4 x i32> @_Z11read_imagef11ocl_image2d11ocl_samplerDv2_i(%opencl.image2d_t addrspace(1)*, i32, <2 x i32>) #1
3031

3132
; Function Attrs: nounwind
32-
define spir_kernel void @test2(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 0) %Img, float addrspace(1)* %result) #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3 !kernel_arg_base_type !4 !kernel_arg_type_qual !5 {
33+
define spir_kernel void @test2(%opencl.image2d_t addrspace(1)* %Img, float addrspace(1)* %result) #0 !kernel_arg_addr_space !1 !kernel_arg_access_qual !2 !kernel_arg_type !3 !kernel_arg_base_type !4 !kernel_arg_type_qual !5 {
3334
;CHECK: Function {{[0-9]+}} [[KernelId]]
3435
entry:
35-
%call = call spir_func float @test(target("spirv.Image", void, 1, 0, 0, 0, 0, 0, 0) %Img, i32 0)
36+
%call = call spir_func float @test(%opencl.image2d_t addrspace(1)* %Img, i32 0)
3637
%arrayidx = getelementptr inbounds float, float addrspace(1)* %result, i32 0
3738
%0 = load float, float addrspace(1)* %arrayidx, align 4
3839
%add = fadd float %0, %call

llvm-spirv/test/extensions/INTEL/SPV_INTEL_blocking_pipes/PipeBlocking.ll

+10-7
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@ target triple = "spir64-unknown-unknown"
3030
; CHECK-SPIRV: 6 Load [[PipeWTy]] [[PipeW:[0-9]+]] {{[0-9]+}} {{[0-9]+}}
3131
; CHECK-SPIRV: 5 WritePipeBlockingINTEL [[PipeW]] {{[0-9]+}} {{[0-9]+}} {{[0-9]+}}
3232

33-
; CHECK-LLVM: call spir_func void @__read_pipe_2_bl(ptr addrspace(1) %0, ptr addrspace(4) %{{[0-9]+}}, i32 4, i32 4)
34-
; CHECK-LLVM: call spir_func void @__read_pipe_2_bl(ptr addrspace(1) %0, ptr addrspace(4) %{{[0-9]+}}, i32 4, i32 4)
35-
; CHECK-LLVM: call spir_func void @__write_pipe_2_bl(ptr addrspace(1) %0, ptr addrspace(4) %{{[0-9]+}}, i32 4, i32 4)
36-
; CHECK-LLVM: call spir_func void @__write_pipe_2_bl(ptr addrspace(1) %0, ptr addrspace(4) %{{[0-9]+}}, i32 4, i32 4)
33+
; CHECK-LLVM: %opencl.pipe_ro_t = type opaque
34+
; CHECK-LLVM: %opencl.pipe_wo_t = type opaque
3735

38-
; CHECK-LLVM: call spir_func void @__write_pipe_2_bl(ptr addrspace(1){{.*}}, ptr addrspace(4) %{{[0-9]+}}, i32 2, i32 2)
36+
; CHECK-LLVM: call spir_func void @__read_pipe_2_bl(%opencl.pipe_ro_t addrspace(1)* %0, i8 addrspace(4)* %{{[0-9]+}}, i32 4, i32 4)
37+
; CHECK-LLVM: call spir_func void @__read_pipe_2_bl(%opencl.pipe_ro_t addrspace(1)* %0, i8 addrspace(4)* %{{[0-9]+}}, i32 4, i32 4)
38+
; CHECK-LLVM: call spir_func void @__write_pipe_2_bl(%opencl.pipe_wo_t addrspace(1)* %0, i8 addrspace(4)* %{{[0-9]+}}, i32 4, i32 4)
39+
; CHECK-LLVM: call spir_func void @__write_pipe_2_bl(%opencl.pipe_wo_t addrspace(1)* %0, i8 addrspace(4)* %{{[0-9]+}}, i32 4, i32 4)
40+
41+
; CHECK-LLVM: call spir_func void @__write_pipe_2_bl(%opencl.pipe_wo_t addrspace(1)*{{.*}}, i8 addrspace(4)* %{{[0-9]+}}, i32 2, i32 2)
3942

4043
; CHECK-SPV-IR: call spir_func void @_Z30__spirv_WritePipeBlockingINTEL{{.*}}(target("spirv.Pipe", 1){{.*}}, ptr addrspace(4){{.*}}, i32 2, i32 2)
4144

@@ -103,8 +106,8 @@ entry:
103106

104107
declare dso_local spir_func void @_Z30__spirv_WritePipeBlockingINTELIKiEv8ocl_pipePvii(%opencl.pipe_wo_t addrspace(1)*, i8 addrspace(4)*, i32, i32)
105108

106-
; CHECK-LLVM: declare spir_func void @__read_pipe_2_bl(ptr addrspace(1), ptr addrspace(4), i32, i32)
107-
; CHECK-LLVM: declare spir_func void @__write_pipe_2_bl(ptr addrspace(1), ptr addrspace(4), i32, i32)
109+
; CHECK-LLVM: declare spir_func void @__read_pipe_2_bl(%opencl.pipe_ro_t addrspace(1)*, i8 addrspace(4)*, i32, i32)
110+
; CHECK-LLVM: declare spir_func void @__write_pipe_2_bl(%opencl.pipe_wo_t addrspace(1)*, i8 addrspace(4)*, i32, i32)
108111

109112
; Function Attrs: convergent mustprogress norecurse nounwind
110113
define linkonce_odr dso_local spir_func void @WritePipeBLockingi9Pointer(i9 addrspace(4)* align 2 dereferenceable(2) %_Data) {

0 commit comments

Comments
 (0)