[clang] [HLSL] Implement the `ldexp` intrinsic (PR #138182)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Fri May 2 05:23:54 PDT 2025


================
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify
+
+float test_double_inputs(double p0, double p1) {
+  return ldexp(p0, p1);
+  // expected-error at -1  {{no matching function for call to 'ldexp'}}
+  // expected-note at hlsl/hlsl_intrinsics.h:* {{candidate template ignored}}
----------------
farzonl wrote:

Ignoring notes will also ignore the template substitution notes which explains the no matching function error for vec5 call to 'ldexp'. Thats something I'd like to explicitly test for to make sure the template is behaving the way we want it to.

https://github.com/llvm/llvm-project/pull/138182


More information about the cfe-commits mailing list