[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 11:08:58 PST 2025
================
@@ -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);
----------------
efriedma-quic wrote:
Do we need special handling for non-hlsl ext-bool-vector types?
https://github.com/llvm/llvm-project/pull/123977
More information about the cfe-commits
mailing list