Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wazevo: fuzz, select does not return the correct value for vectors #1814

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

evacchi
Copy link
Contributor

@evacchi evacchi commented Oct 23, 2023

@evacchi evacchi force-pushed the fuzz-select branch 2 times, most recently from 44e94b3 to af44b37 Compare October 24, 2023 09:04
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Comment on lines 1903 to 1904
ifNonZeroPos.begin, ifNonZeroPos.end = ifnzTgt, ifnzTgt
m.labelPositions[ifNonZero] = ifNonZeroPos
Copy link
Member

@mathetake mathetake Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz use insertBrTargetLabel instead to avoid these lines (none of other places directly modify labelPositions).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to use insertBrTargetLabel() but isn't that only for jump backwards? it inserts a labeled nop immediately, while here I need to allocate a label, point to it in the condBr, and then insert the nop at the right spot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I can just split insertBrTargetLabel() to 2 functions, with one taking a pre-declared label

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, let me know if this is good.

Copy link
Member

@mathetake mathetake Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to sleep but I believe you should be able to achieve what you want without adding new change like that. Basically checking other places in the lower_instr would help

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see, from a cursory look I didn't notice how you were doing it.

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given my comment ^is optional, good to go anyway

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
@evacchi evacchi merged commit e3e5b99 into main Oct 25, 2023
53 checks passed
@evacchi evacchi deleted the fuzz-select branch October 25, 2023 15:32
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