Skip to content

[6.9] Invalid integer size created by GVN #8573

Description

@llvm-beanz

Description
GVN is trying to be clever and coerce vector loads into just being large integers which can then be masked and shifted more flexibly. This would be fine, except that in this case it is producing i128 values, which is illegal in DXIL.

Steps to Reproduce

StructuredBuffer<uint4> InBuf;
RWStructuredBuffer<uint> Out;

float4 main(uint sel : SEL) : SV_Target {
  uint4 idx = InBuf[0];
  [unroll]
  for (uint i = 0; i < 4; ++i)
    idx[i] *= 48u;
  Out[0] = idx[sel];
  return asfloat(idx);
}

Compiler Explorer

Environment

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

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashneeds-triageAwaiting triage

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions