//META: generated=true
//META: model=claude-opus-4-7
//META: generated_at=2026-05-20T13:50:00+00:00
//META: source_commit=1e0d460c1cb410005c4f775ba11fbc803cc8c16d
//META: doc_ref=docs/generated/design/ir-reference/types.md#basic-scalar-types
//META: doc_section_digest=90fd91b1a21860b3569e7b02fb36035ba69014ded4abafe7604e89fcb5aea51a
//META: purpose=The unsigned-integer scalar opcodes UInt8, UInt16, UInt, UInt64 appear as struct-field types in the IR dump.
//META: intent=functional
//META: pipeline_stage=lower
//META: warning=Auto-generated. May drift from source. Do not edit by hand.

// The doc's "Basic scalar types" table lists `UInt8`, `UInt16`,
// `UInt`, `UInt64` as separate IR type opcodes. A struct whose
// fields cover each unsigned-integer width surfaces all four
// opcodes in the IR dump.

//TEST:SIMPLE(filecheck=IR):-target spirv-asm -dump-ir -o /dev/null -stage compute -entry main

struct UInts { uint8_t a; uint16_t b; uint c; uint64_t d; }

uniform UInts s;
uniform RWStructuredBuffer<uint> buf;

[numthreads(1, 1, 1)]
void main()
{
    buf[0] = uint(s.a) + uint(s.b) + s.c + uint(s.d);
}

// IR-LABEL: struct %UInts
// IR: field(%{{.*}}, UInt8)
// IR: field(%{{.*}}, UInt16)
// IR: field(%{{.*}}, UInt)
// IR: field(%{{.*}}, UInt64)
