[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)
Kaitlin Peng via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 29 12:11:29 PDT 2025
================
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 %s -triple spirv-pc-vulkan-compute -verify
+
+typedef float float2 __attribute__((ext_vector_type(2)));
+
+float2 test_no_second_arg(float2 p0) {
+ return __builtin_spirv_refract(p0);
+ // expected-error at -1 {{too few arguments to function call, expected 3, have 1}}
+}
+
+float2 test_too_few_arg(float2 p0) {
----------------
kmpeng wrote:
NIT: Would be clearer if this test and `test_no_second_arg` had more similar names since `test_no_second_arg` is also testing too few arguments
https://github.com/llvm/llvm-project/pull/136026
More information about the cfe-commits
mailing list