[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

Deric C. via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 11:41:45 PDT 2025


================
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -std=hlsl202y -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify
+
+double4 test_double_inputs(double p0, double p1, double p2) {
+  return lit(p0, p1, p2);
+  // expected-error at -1 {{call to deleted function 'lit'}}
----------------
Icohedron wrote:

I think these should be ambiguity errors rather than call to deleted function errors, but I'm not sure of an easy way to do this without also allowing implicit vector truncation.

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


More information about the cfe-commits mailing list