| 1 |
; RUN: llvm-as %s -o %t.bc |
| 2 |
; RUN: llvm-spirv %t.bc -o %t.spv |
| 3 |
; RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV |
| 4 |
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.rev.bc |
| 5 |
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM |
| 6 |
|
| 7 |
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" |
| 8 |
target triple = "spir64-unknown-unknown" |
| 9 |
|
| 10 |
; CHECK-SPIRV: Decorate [[ALIGNMENT:[0-9]+]] Alignment 16 |
| 11 |
; CHECK-SPIRV: FunctionParameter {{[0-9]+}} [[ALIGNMENT]] |
| 12 |
|
| 13 |
%struct._ZTS6Struct.Struct = type { %struct._ZTS11floatStruct.floatStruct, %struct._ZTS11floatStruct.floatStruct } |
| 14 |
%struct._ZTS11floatStruct.floatStruct = type { float, float, float, float } |
| 15 |
|
| 16 |
; CHECK-LLVM: define spir_func void @_ZN3FooC2Ev(ptr addrspace(4) align 16 %0) |
| 17 |
; Function Attrs: noinline nounwind |
| 18 |
define spir_func void @_ZN3FooC2Ev(%struct._ZTS6Struct.Struct addrspace(4)* align 16 %0) #0 { |
| 19 |
ret void |
| 20 |
} |
| 21 |
|
| 22 |
attributes #0 = { noinline nounwind } |
| 23 |
|
| 24 |
!llvm.module.flags = !{!0, !1} |
| 25 |
!opencl.spir.version = !{!2} |
| 26 |
!spirv.Source = !{!3} |
| 27 |
!opencl.used.extensions = !{!4} |
| 28 |
!opencl.used.optional.core.features = !{!4} |
| 29 |
!opencl.compiler.options = !{!4} |
| 30 |
|
| 31 |
!0 = !{i32 1, !"wchar_size", i32 4} |
| 32 |
!1 = !{i32 7, !"frame-pointer", i32 2} |
| 33 |
!2 = !{i32 1, i32 2} |
| 34 |
!3 = !{i32 4, i32 100000} |
| 35 |
!4 = !{} |