================
@@ -1984,6 +1984,15 @@ llvm::Constant
*ConstantEmitter::emitForMemory(CodeGenModule &CGM,
return Res;
}
+ // In HLSL bool vectors are stored in memory as a vector of i32
+ if (destType->isExtVectorBoolType() && CGM.getContext().getLangOpts().HLSL) {
+ llvm::Type *boolVecTy = CGM.getTypes().ConvertTypeForMem(destType);
----------------
spall wrote:
I don't believe so. This code is necessary for HLSL because the constant 'C' is
a <2 x i1> but HLSL needs it to be a <2 x i32> hence the zero extension. For
non HLSL vectors the expected form would be <2 x i1> so nothing needs to be
done.
https://hlsl.godbolt.org/z/nsb6jd1vn
https://github.com/llvm/llvm-project/pull/123977
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits