[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 09:00:45 PST 2024


================
@@ -17,12 +17,10 @@ double test_int_builtin(double p0) {
 
 double2 test_int_builtin_2(double2 p0) {
   return __builtin_hlsl_elementwise_firstbithigh(p0);
-  // expected-error at -1 {{1st argument must be a vector of integers
-  // (was 'double2' (aka 'vector<double, 2>'))}}
+  // expected-error at -1 {{1st argument must be a vector of integers (was 'double2' (aka 'vector<double, 2>'))}}
 }
 
 float test_int_builtin_3(float p0) {
   return __builtin_hlsl_elementwise_firstbithigh(p0);
-  // expected-error at -1 {{1st argument must be a vector of integers
-  // (was 'float')}}
+  // expected-error at -1 {{1st argument must be a vector of integers (was 'double')}}
----------------
llvm-beanz wrote:

I know you can do a `\` continuation for multiple expected directives, but I don't know if you can do that inside the match string. For example I know this works:

```
  <some_bad_code> // expected-error {{ first error }} \
                  // expected-error {{ second error }}
```

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


More information about the llvm-commits mailing list