xref: /llvm-project/llvm/test/CodeGen/DirectX/rsqrt_error.ll (revision 8cf85653b6f5c90b83f8a5741baad5725d6c6932)
1cdfd884bSS. Bharadwaj Yadavalli; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
28f9ee39cSFarzon Lotfi
38f9ee39cSFarzon Lotfi; DXIL operation rsqrt does not support double overload type
4*8cf85653SJustin Bogner; CHECK: in function rsqrt_double
5*8cf85653SJustin Bogner; CHECK-SAME: Cannot create RSqrt operation: Invalid overload type
68f9ee39cSFarzon Lotfi
78f9ee39cSFarzon Lotfi; Function Attrs: noinline nounwind optnone
88f9ee39cSFarzon Lotfidefine noundef double @rsqrt_double(double noundef %a) #0 {
98f9ee39cSFarzon Lotfientry:
108f9ee39cSFarzon Lotfi  %a.addr = alloca double, align 8
118f9ee39cSFarzon Lotfi  store double %a, ptr %a.addr, align 8
128f9ee39cSFarzon Lotfi  %0 = load double, ptr %a.addr, align 8
138f9ee39cSFarzon Lotfi  %dx.rsqrt = call double @llvm.dx.rsqrt.f64(double %0)
148f9ee39cSFarzon Lotfi  ret double %dx.rsqrt
158f9ee39cSFarzon Lotfi}
16