Skip to content

Correct 2 s390x Vector Evaluate bugs#13019

Open
theotherjimmy wants to merge 2 commits intobytecodealliance:mainfrom
theotherjimmy:s390x-veval-bug
Open

Correct 2 s390x Vector Evaluate bugs#13019
theotherjimmy wants to merge 2 commits intobytecodealliance:mainfrom
theotherjimmy:s390x-veval-bug

Conversation

@theotherjimmy
Copy link
Copy Markdown
Contributor

Bugs:

  1. Argument swapping of vec eval lowerings corresponding to a and (not b) and c
  2. Argument swapping (divisor and dividend reversed) of the sdiv overflow check using vec eval

I have added runtests for both of these bugs in their respective commits.

Thanks for reporting these bugs @shumbo !

@theotherjimmy theotherjimmy requested review from a team as code owners April 9, 2026 19:57
@theotherjimmy theotherjimmy requested review from alexcrichton and removed request for a team April 9, 2026 19:57
@alexcrichton alexcrichton requested review from uweigand and removed request for alexcrichton April 9, 2026 19:58
@theotherjimmy theotherjimmy marked this pull request as draft April 9, 2026 20:04
@theotherjimmy
Copy link
Copy Markdown
Contributor Author

My bad about the test failures. I'll fix them.

The vec eval bug was created by generating all of the masks with a script,
and then updating the masks in place without reordering the arguments to
these 2 cases.

Reported-by: Shun Kashiwa <shunthedev@gmail.com> @shumbo
This bug was inruduced by mistakenly swapping the divisor and dividend
in the overflow check included in sdiv.i128.

Reported-by: Shun Kashiwa <shunthedev@gmail.com> @shumbo
@theotherjimmy theotherjimmy marked this pull request as ready for review April 9, 2026 20:09
@theotherjimmy
Copy link
Copy Markdown
Contributor Author

Test failures were related to having forgotten to bless the new precise compile output for these two bugs.

@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant