Skip to content

[HLSL] Boolean vector support #91639

Closed
@llvm-beanz

Description

@llvm-beanz

Clang EXT vectors don't support swizzling boolean values because you can't take an address of an i1. In HLSL bool is i32, and we support boolean vector swizzles. Additionally, the bool vectors in Clang are translated to LLVM type i8 (as a bitmap) while in HLSL it is a vector if i32.

This feature needs design and spec work, and should potentially be something we look at for how to clean up our boolean representation for vectors since what we do now in DXC doesn't really work in all cases (see: microsoft/DirectXShaderCompiler#6082).

Acceptance Criteria

  • Specification of boolean behavior we intend to support in Clang
  • Implementation and tests of vector of bool swizzling

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions