[clang] [HLSL][Matrix] Add Matrix Bool and represent them as i32 elements (PR #171051)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 7 13:05:17 PST 2025


================
@@ -99,18 +99,17 @@ float2 test_builtin_clamp_int_vect_to_float_vec_promotion(int2 p0, float p1) {
 }
 
 float test_builtin_clamp_bool_type_promotion(bool p0) {
-  return __builtin_hlsl_elementwise_clamp(p0, p0, p0);
-  // expected-error at -1 {{1st argument must be a vector, integer or floating-point type (was 'bool')}}
+  return __builtin_hlsl_elementwise_clamp(p0, p0, p0); // note: should not error
----------------
farzonl wrote:

https://godbolt.org/z/rbx7Ebdhs

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


More information about the cfe-commits mailing list