|
1 | 1 | ; RUN: llvm-as %s -o %t.bc
|
2 |
| -; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_blocking_pipes -spirv-text -o %t.spt |
| 2 | +; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_blocking_pipes,+SPV_INTEL_arbitrary_precision_integers -spirv-text -o %t.spt |
3 | 3 | ; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
|
4 | 4 | ; FIXME: add more negative test cases
|
5 |
| -; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_blocking_pipes -o %t.spv |
| 5 | +; RUN: llvm-spirv %t.spt -to-binary -o %t.spv |
6 | 6 | ; RUN: llvm-spirv -r %t.spv -o %t.bc
|
7 | 7 | ; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-LLVM
|
8 | 8 |
|
| 9 | +; RUN: llvm-spirv -r %t.spv -o %t.bc --spirv-target-env=SPV-IR |
| 10 | +; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-SPV-IR |
| 11 | + |
9 | 12 | ; ModuleID = 'test/CodeGenOpenCL/pipe_builtin.cl'
|
10 | 13 | source_filename = "test/CodeGenOpenCL/pipe_builtin.cl"
|
11 | 14 | target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
|
@@ -35,6 +38,11 @@ target triple = "spir64-unknown-unknown"
|
35 | 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)
|
36 | 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)
|
37 | 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) |
| 42 | + |
| 43 | +; CHECK-SPV-IR: %spirv.Pipe._0 = type opaque |
| 44 | +; CHECK-SPV-IR: call spir_func void @_Z30__spirv_WritePipeBlockingINTEL{{.*}}(%spirv.Pipe._1 addrspace(1)*{{.*}}, i9 addrspace(4)*{{.*}}, i32 2, i32 2) |
| 45 | + |
38 | 46 | ; Function Attrs: convergent noinline nounwind optnone
|
39 | 47 | define spir_func void @foo(%opencl.pipe_ro_t addrspace(1)* %p, i32 addrspace(1)* %ptr) #0 {
|
40 | 48 | entry:
|
@@ -102,6 +110,23 @@ declare dso_local spir_func void @_Z30__spirv_WritePipeBlockingINTELIKiEv8ocl_pi
|
102 | 110 | ; CHECK-LLVM: declare spir_func void @__read_pipe_2_bl(%opencl.pipe_ro_t addrspace(1)*, i8 addrspace(4)*, i32, i32)
|
103 | 111 | ; CHECK-LLVM: declare spir_func void @__write_pipe_2_bl(%opencl.pipe_wo_t addrspace(1)*, i8 addrspace(4)*, i32, i32)
|
104 | 112 |
|
| 113 | +; Function Attrs: convergent mustprogress norecurse nounwind |
| 114 | +define linkonce_odr dso_local spir_func void @WritePipeBLockingi9Pointer(i9 addrspace(4)* align 2 dereferenceable(2) %_Data) { |
| 115 | +entry: |
| 116 | + %_Data.addr = alloca i9 addrspace(4)*, align 8 |
| 117 | + %_WPipe = alloca %opencl.pipe_wo_t addrspace(1)*, align 8 |
| 118 | + %_Data.addr.ascast = addrspacecast i9 addrspace(4)** %_Data.addr to i9 addrspace(4)* addrspace(4)* |
| 119 | + %_WPipe.ascast = addrspacecast %opencl.pipe_wo_t addrspace(1)** %_WPipe to %opencl.pipe_wo_t addrspace(1)* addrspace(4)* |
| 120 | + store i9 addrspace(4)* %_Data, i9 addrspace(4)* addrspace(4)* %_Data.addr.ascast, align 8 |
| 121 | + %0 = bitcast %opencl.pipe_wo_t addrspace(1)** %_WPipe to i8* |
| 122 | + %1 = load %opencl.pipe_wo_t addrspace(1)*, %opencl.pipe_wo_t addrspace(1)* addrspace(4)* %_WPipe.ascast, align 8 |
| 123 | + %2 = load i9 addrspace(4)*, i9 addrspace(4)* addrspace(4)* %_Data.addr.ascast, align 8 |
| 124 | + call spir_func void @_Z30__spirv_WritePipeBlockingINTELIDU9_Ev8ocl_pipePKT_ii(%opencl.pipe_wo_t addrspace(1)* %1, i9 addrspace(4)* %2, i32 2, i32 2) |
| 125 | + ret void |
| 126 | +} |
| 127 | + |
| 128 | +declare dso_local spir_func void @_Z30__spirv_WritePipeBlockingINTELIDU9_Ev8ocl_pipePKT_ii(%opencl.pipe_wo_t addrspace(1)*, i9 addrspace(4)*, i32, i32) |
| 129 | + |
105 | 130 | attributes #0 = { convergent noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "denorms-are-zero"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
106 | 131 |
|
107 | 132 | !llvm.module.flags = !{!0}
|
|
0 commit comments