1 ; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
3 ; Make sure dxil operation function calls for log2 are generated for float and half.
5 define noundef float @log2_float(float noundef %a) #0 {
7 ; CHECK:call float @dx.op.unary.f32(i32 23, float %{{.*}})
8 %elt.log2 = call float @llvm.log2.f32(float %a)
12 define noundef half @log2_half(half noundef %a) #0 {
14 ; CHECK:call half @dx.op.unary.f16(i32 23, half %{{.*}})
15 %elt.log2 = call half @llvm.log2.f16(half %a)
19 declare half @llvm.log2.f16(half)
20 declare float @llvm.log2.f32(float)