Skip to content

[SPIR-V] Incorrect SPIR-V generated for 'or' and 'and' #7475

@spall

Description

@spall

Description

Saw this error

fatal error: generated SPIR-V is invalid: The Component Type of Vector 1 must be the same as ResultType.
  %23 = OpVectorShuffle %v4bool %22 %19 4 5 6 3

when compiling this code:

RWStructuredBuffer<bool4> Out : register(u1);

[numthreads(1,1,1)]
void main() {
  
  Out[1].xyz = or(true,false);
}

Note: it also fails for 'and'

Steps to Reproduce
https://godbolt.org/z/h5WqG1T9b

Actual Behavior

Environment

  • DXC version 1.8.2403.2
  • Host Operating System N/A

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashneeds-triageAwaiting triagespirvWork related to SPIR-V

Type

No type

Projects

Status

Done

Status

Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions