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
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
Compiler Explorer
Environment