| 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) |