Skip to content

[HLSL] select not resolving correctly for complex cases #126570

Closed
@llvm-beanz

Description

@llvm-beanz

HLSL currently allows much more flexible overloading of the select function. The following is an example of a case that DXC supports which Clang does not.

typedef uint32_t4 uint32_t8[2];

export void filter(inout uint32_t4 output, uint32_t predicate, uint32_t value) {
  output = select(uint4(0,1,2,3) == (uint4)predicate, value, output);
}

Compiler Explorer

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