Skip to content

[6.9] Validator failing to look through multi-level GEPs #8571

Closed

Description

@llvm-beanz

Description
When targeting SM 6.9 arrays of vectors are preserved in groupshared memory, which can result in multi-level GEP instructions for addressing into groupshared allocations. The DXIL validator was not updated to handle multi-level GEP instructions, which results in DXIL validation failures for otherwise valid cases.

Steps to Reproduce

RWStructuredBuffer<float> Out;

groupshared float3x3 g_mats[64];

[numthreads(64, 1, 1)]
void main(uint3 gtid : SV_GroupThreadID, uint3 dtid : SV_DispatchThreadID) {
  g_mats[gtid.x] = (float3x3)0;
  GroupMemoryBarrierWithGroupSync();

  for (uint k = 0; k < 8; ++k) {
    g_mats[gtid.x][0][0] += (float)k;
    g_mats[gtid.x][1][1] += (float)k;
    g_mats[gtid.x][2][2] += (float)k;
  }

  GroupMemoryBarrierWithGroupSync();

  if (gtid.x == 0) {
    float3x3 sum = g_mats[0];
    for (uint i = 1; i < 64; ++i)
      sum += g_mats[i];
    Out[dtid.x] = sum[0][0] + sum[1][1] + sum[2][2];
  }
}

Compiler Explorer

Environment

  • DXC version: 1.9+
  • Host Operating System: Any

Activity

  1. added
    bug
    needs-triage
    on Jun 19, 2026
  2. added a commit that references this issue on Jun 30, 2026
    cd71b17
  3. moved this from Planning to Closed in HLSL Supporton Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugneeds-triage

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions