Skip to content

[opt] Fix constant folding of OpSelect with a scalar condition - #6843

Open
cmarcelo wants to merge 1 commit into
KhronosGroup:mainfrom
cmarcelo:fold-select-scalar-condition
Open

[opt] Fix constant folding of OpSelect with a scalar condition#6843
cmarcelo wants to merge 1 commit into
KhronosGroup:mainfrom
cmarcelo:fold-select-scalar-condition

Conversation

@cmarcelo

Copy link
Copy Markdown
Contributor

Since SPIR-V 1.4, a scalar OpSelect condition selects between whole objects, including vectors and composites. Spec constant folding evaluated it per component, asserting or producing invalid values. Handle Select with a folding rule that implements both forms.

@CLAassistant

CLAassistant commented Aug 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Since SPIR-V 1.4, a scalar OpSelect condition selects between whole
objects, including vectors and composites.  Spec constant folding
evaluated it per component, asserting or producing invalid values.
Handle Select with a folding rule that implements both forms.
@cmarcelo
cmarcelo force-pushed the fold-select-scalar-condition branch from 11141cb to 5dd05ca Compare August 15, 2026 06:00
@dneto0
dneto0 requested a review from s-perron August 26, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants