blob: d7f8be6288788a400faff2a22d57a9f50b9d6f16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
; 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 @sin_float(float noundef %a) {
entry:
; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Sin %[[#]]
%elt.sin = call float @llvm.sin.f32(float %a)
ret float %elt.sin
}
define noundef half @sin_half(half noundef %a) {
entry:
; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] Sin %[[#]]
%elt.sin = call half @llvm.sin.f16(half %a)
ret half %elt.sin
}
declare half @llvm.sin.f16(half)
declare float @llvm.sin.f32(float)
|