Skip to content

[HLSL][SPIRV] Hitting assert when compiling program with splitdouble version of asuint #153091

@spall

Description

@spall

Hitting an assert when compiling this program with -spirv

StructuredBuffer<double4> In0 : register(t0);
RWStructuredBuffer<uint4> Lows : register(u1);
RWStructuredBuffer<uint4> Highs : register(u2);

[numthreads(1,1,1)]
void main() {

  asuint(In0[0], Lows[0], Highs[0]);
  uint4 Tmp0;
  uint4 Tmp1;
  asuint(In0[1].xyz, Tmp0.xyz, Tmp1.xyz);
  asuint(In0[1].w, Tmp0.w, Tmp1.w);
  Lows[1] = Tmp0;
  Highs[1]= Tmp1;
  asuint(In0[2].xy, Tmp0.xy, Tmp1.xy);
  asuint(In0[2].zw, Tmp0.zw, Tmp1.zw);
  Lows[2] = Tmp0;
  Highs[2] = Tmp1;
  asuint(double4(10, 0, 5.57, 111.111), Lows[3], Highs[3]);
}
Assertion failed: TargetType->getNumElements() <= SourceType->getNumElements(), file llvm-project/llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp, line 77

https://godbolt.org/z/jPPGb48vo

Metadata

Metadata

Assignees

Labels

backend:SPIR-VcrashPrefer [crash-on-valid] or [crash-on-invalid]

Type

Projects

Status

Active

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions