22 lines · plain
1; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s2; 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 326; CHECK-DAG: %[[#type_f64:]] = OpTypeFloat 647; CHECK: %[[#extinst_f32:]] = OpExtInst %[[#type_f32]] %[[#ext]] tan %[[#]]8; CHECK: %[[#extinst_f64:]] = OpExtInst %[[#type_f64]] %[[#ext]] tan %[[#]]9 10define float @test_tan_f32(float %x) {11 %res = call float @llvm.tan.f32(float %x)12 ret float %res13}14 15define double @test_tan_f64(double %x) {16 %res = call double @llvm.tan.f64(double %x)17 ret double %res18}19 20declare float @llvm.tan.f32(float)21declare double @llvm.tan.f64(double)22