1 ; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
3 ; Make sure dxil operation function calls for sinh are generated for float and half.
5 define noundef float @sinh_float(float noundef %a) {
7 ; CHECK:call float @dx.op.unary.f32(i32 19, float %{{.*}})
8 %elt.sinh = call float @llvm.sinh.f32(float %a)
12 define noundef half @sinh_half(half noundef %a) {
14 ; CHECK:call half @dx.op.unary.f16(i32 19, half %{{.*}})
15 %elt.sinh = call half @llvm.sinh.f16(half %a)
19 define noundef <4 x float> @sinh_float4(<4 x float> noundef %a) {
21 ; CHECK: [[ee0:%.*]] = extractelement <4 x float> %a, i64 0
22 ; CHECK: [[ie0:%.*]] = call float @dx.op.unary.f32(i32 19, float [[ee0]])
23 ; CHECK: [[ee1:%.*]] = extractelement <4 x float> %a, i64 1
24 ; CHECK: [[ie1:%.*]] = call float @dx.op.unary.f32(i32 19, float [[ee1]])
25 ; CHECK: [[ee2:%.*]] = extractelement <4 x float> %a, i64 2
26 ; CHECK: [[ie2:%.*]] = call float @dx.op.unary.f32(i32 19, float [[ee2]])
27 ; CHECK: [[ee3:%.*]] = extractelement <4 x float> %a, i64 3
28 ; CHECK: [[ie3:%.*]] = call float @dx.op.unary.f32(i32 19, float [[ee3]])
29 ; CHECK: insertelement <4 x float> poison, float [[ie0]], i64 0
30 ; CHECK: insertelement <4 x float> %{{.*}}, float [[ie1]], i64 1
31 ; CHECK: insertelement <4 x float> %{{.*}}, float [[ie2]], i64 2
32 ; CHECK: insertelement <4 x float> %{{.*}}, float [[ie3]], i64 3
33 %2 = call <4 x float> @llvm.sinh.v4f32(<4 x float> %a)
37 declare half @llvm.sinh.f16(half)
38 declare float @llvm.sinh.f32(float)
39 declare <4 x float> @llvm.sinh.v4f32(<4 x float>)