[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)
Xiang Li via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 4 08:24:44 PST 2024
================
@@ -0,0 +1,27 @@
+
+// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected
----------------
python3kgae wrote:
We have all those intrinsic error check tests which looks the same.
Is it possible to make the builtin name as a macro and just add more run lines for each new builtin?
Something like
```
float test_too_few_arg() {
return TEST_NAME();
// expected-error at -1 {{too few arguments to function call, expected 1, have 0}}
}
```
and add
```
-DTEST_NAME=__builtin_hlsl_elementwise_rcp
```
to the RUN line
https://github.com/llvm/llvm-project/pull/83857
More information about the cfe-commits
mailing list