Skip to content

[HLSL] Attribute vectors have different cast behavior #142430

@V-FEXrt

Description

@V-FEXrt

https://godbolt.org/z/j1WPxaGKG

uint32_t4 can be implicitly casted to uint64_t4 but __attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int raises an error instead.

This causes issues with intrinsics such as firstbitlow which use the attribute type

DXC is perfectly fine with the implict cast for firstbitlow, while clang raises a compiler error

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions