[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 10:55:43 PST 2024


================
@@ -9272,6 +9272,8 @@ def err_typecheck_expect_scalar_or_vector : Error<
   "a vector of such type is required">;
 def err_typecheck_expect_any_scalar_or_vector : Error<
   "invalid operand of type %0 where a scalar or vector is required">;
+def err_typecheck_expect_scalar_or_vector_not_type : Error<
----------------
llvm-beanz wrote:

Do we need a new unique diagnostic for this or should we be using `err_typecheck_expect_any_scalar_or_vector` or `err_typecheck_expect_scalar_or_vector`?

In general we should try not to add unique diagnostics unless there really isn't an existing one that works.

In looking at this more closely I'm not sure we should have added `err_typecheck_expect_any_scalar_or_vector`, as we've basically added two _extremely similar_ diagnostics that probably should be combined.

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


More information about the llvm-commits mailing list