1 ; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
3 ; Make sure dxil operation function calls for sin are generated for float and half.
4 ; CHECK:call float @dx.op.unary.f32(i32 13, float %{{.*}})
5 ; CHECK:call half @dx.op.unary.f16(i32 13, half %{{.*}})
7 ; Function Attrs: noinline nounwind optnone
8 define noundef float @sin_float(float noundef %a) #0 {
10 %a.addr = alloca float, align 4
11 store float %a, ptr %a.addr, align 4
12 %0 = load float, ptr %a.addr, align 4
13 %1 = call float @llvm.sin.f32(float %0)
17 ; Function Attrs: noinline nounwind optnone
18 define noundef half @sin_half(half noundef %a) #0 {
20 %a.addr = alloca half, align 2
21 store half %a, ptr %a.addr, align 2
22 %0 = load half, ptr %a.addr, align 2
23 %1 = call half @llvm.sin.f16(half %0)