brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 8301e05 Raw
46 lines · plain
1; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s2; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}3 4; CHECK-DAG: %[[#op_ext_glsl:]] = OpExtInstImport "GLSL.std.450"5; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 326; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 167; CHECK-DAG: %[[#vec4_float_32:]] = OpTypeVector %[[#float_32]] 48; CHECK-DAG: %[[#vec4_float_16:]] = OpTypeVector %[[#float_16]] 49 10define noundef float @tan_float(float noundef %a) {11entry:12; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]13; CHECK: %[[#]] = OpExtInst %[[#float_32]] %[[#op_ext_glsl]] Tan %[[#arg0]]14  %elt.tan = call float @llvm.tan.f32(float %a)15  ret float %elt.tan16}17 18define noundef half @tan_half(half noundef %a) {19entry:20; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]21; CHECK: %[[#]] = OpExtInst %[[#float_16]] %[[#op_ext_glsl]] Tan %[[#arg0]]22  %elt.tan = call half @llvm.tan.f16(half %a)23  ret half %elt.tan24}25 26define noundef <4 x float> @tan_float4(<4 x float> noundef %a) {27entry:28  ; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]29  ; CHECK: %[[#]] = OpExtInst %[[#vec4_float_32]] %[[#op_ext_glsl]] Tan %[[#arg0]]30  %elt.tan = call <4 x float> @llvm.tan.v4f32(<4 x float> %a)31  ret <4 x float> %elt.tan32}33 34define noundef <4 x half> @tan_half4(<4 x half> noundef %a) {35entry:36  ; CHECK: %[[#arg0:]] = OpFunctionParameter %[[#]]37  ; CHECK: %[[#]] = OpExtInst %[[#vec4_float_16]] %[[#op_ext_glsl]] Tan %[[#arg0]]38  %elt.tan = call <4 x half> @llvm.tan.v4f16(<4 x half> %a)39  ret <4 x half> %elt.tan40}41 42declare half @llvm.tan.f16(half)43declare float @llvm.tan.f32(float)44declare <4 x half> @llvm.tan.v4f16(<4 x half>)45declare <4 x float> @llvm.tan.v4f32(<4 x float>)46