1; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s 2 3; Test that for scalar and vector inputs, asdouble maps down to the makeDouble 4; DirectX op 5 6define noundef double @asdouble_scalar(i32 noundef %low, i32 noundef %high) { 7; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low, i32 %high) 8 %ret = call double @llvm.dx.asdouble.i32(i32 %low, i32 %high) 9 ret double %ret 10} 11 12declare double @llvm.dx.asdouble.i32(i32, i32) 13 14define noundef <3 x double> @asdouble_vec(<3 x i32> noundef %low, <3 x i32> noundef %high) { 15; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low.i0, i32 %high.i0) 16; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low.i1, i32 %high.i1) 17; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low.i2, i32 %high.i2) 18 %ret = call <3 x double> @llvm.dx.asdouble.v3i32(<3 x i32> %low, <3 x i32> %high) 19 ret <3 x double> %ret 20} 21 22declare <3 x double> @llvm.dx.asdouble.v3i32(<3 x i32>, <3 x i32>) 23