[clang] [HLSL][Matrix] Load and store ConstantMatrixBoolTypes as i32 FixedVectorTypes (PR #175245)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 9 13:45:15 PST 2026


================
@@ -2216,7 +2216,7 @@ llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value *Value, QualType Ty) {
   if (auto *AtomicTy = Ty->getAs<AtomicType>())
     Ty = AtomicTy->getValueType();
 
-  if (Ty->isExtVectorBoolType()) {
+  if (Ty->isExtVectorBoolType() || Ty->isConstantMatrixBoolType()) {
----------------
farzonl wrote:

Curious I thought there would be some kind of HLSL specific thing for the vector case?

Second C\C++ does not support boolean matrix types so this is correct as far as I can tell. However if they ever do or some other C dialect comes along that does and they want to treat bools as I1 will this code still be correct?

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


More information about the cfe-commits mailing list