[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 24 12:31:48 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) {
----------------
efriedma-quic wrote:
```suggestion
if (destType->isExtVectorBoolType() && !destType->isPackedVectorBoolType(Ctx)) {
```
Same for other places where you explicitly check for HLSL.
https://github.com/llvm/llvm-project/pull/123977
More information about the cfe-commits
mailing list