blob: 239b668644e12805ef89db81585f7227237ea1c3 [file] [log] [blame] [edit]
; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-vulkan %s -o - | FileCheck %s
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan %s -o - -filetype=obj | spirv-val %}
; CHECK: OpExtInstImport "GLSL.std.450"
define noundef float @cos_float(float noundef %a) {
entry:
; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Cos %[[#]]
%elt.cos = call float @llvm.cos.f32(float %a)
ret float %elt.cos
}
define noundef half @cos_half(half noundef %a) {
entry:
; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Cos %[[#]]
%elt.cos = call half @llvm.cos.f16(half %a)
ret half %elt.cos
}
declare half @llvm.cos.f16(half)
declare float @llvm.cos.f32(float)