File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
2
+ ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
3
+
4
+ ; CHECK-DAG: %[[#ext:]] = OpExtInstImport "OpenCL.std"
5
+ ; CHECK-DAG: %[[#type_f32:]] = OpTypeFloat 32
6
+ ; CHECK-DAG: %[[#type_f64:]] = OpTypeFloat 64
7
+ ; CHECK: %[[#extinst_f32:]] = OpExtInst %[[#type_f32]] %[[#ext]] tan %[[#]]
8
+ ; CHECK: %[[#extinst_f64:]] = OpExtInst %[[#type_f64]] %[[#ext]] tan %[[#]]
9
+
10
+ define float @test_tan_f32 (float %x ) {
11
+ %res = call float @llvm.tan.f32 (float %x )
12
+ ret float %res
13
+ }
14
+
15
+ define double @test_tan_f64 (double %x ) {
16
+ %res = call double @llvm.tan.f64 (double %x )
17
+ ret double %res
18
+ }
19
+
20
+ declare float @llvm.tan.f32 (float )
21
+ declare double @llvm.tan.f64 (double )
Original file line number Diff line number Diff line change
1
+ ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
2
+ ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
3
+
4
+ ; CHECK: %[[#type:]] = OpTypeInt 32 0
5
+ ; CHECK: %[[#ext:]] = OpTypeRuntimeArray %[[#type]]
6
+ ; CHECK: %[[#]] = OpTypePointer Function %[[#ext]]
7
+
8
+ define spir_func void @_Z3foov () {
9
+ entry:
10
+ %i = alloca [0 x i32 ], align 4
11
+ ret void
12
+ }
You can’t perform that action at this time.
0 commit comments