[clang] [llvm] [HLSL] [DXIL] Implement the `AddUint64` HLSL function and the `UAddc` DXIL op (PR #125319)
Deric Cheung via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 5 16:48:26 PST 2025
================
@@ -12553,6 +12553,8 @@ def err_std_initializer_list_malformed : Error<
"%0 layout not recognized. Must be a non-polymorphic class type with no bases and two fields: a 'const E *' and either another 'const E *' or a 'std::size_t'">;
// HLSL Diagnostics
+def err_hlsl_adduint64_invalid_arguments: Error<
----------------
Icohedron wrote:
I pushed a new commit ([eac0fe5](https://github.com/llvm/llvm-project/pull/125319/commits/eac0fe53c4a306886256ea52b308b3e842572170)).
The case of a scalar being passed as an argument is now back to using `err_vec_builtin_non_vector` to emit an example error message of: `all arguments to AddUint64 must be vectors`
The case of a `uint3` being passed as an argument is now using a new diag called `err_invalid_even_odd_vector_element_count` which emits an example error message of: `invalid element count of 3 in vector operand (expected an even element count in the range of 2 and 4)`.
I omitted the expected type from the error message, because passing in an invalid type would hit a separate error handler anyways. (The error would be `passing 'int3' (aka 'vector<int, 3>') to parameter of incompatible type '__attribute__((__vector_size__(3 * sizeof(unsigned int)))) unsigned int' (vector of 3 'unsigned int' values)`
https://github.com/llvm/llvm-project/pull/125319
More information about the cfe-commits
mailing list