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

[mono][interp] Expand compare + brfalse/brtrue with single conditional branch opcode #80046

Merged

Conversation

kotlarmilos
Copy link
Member

This PR expands compare + brfalse/brtrue with single conditional branch opcode.

@ghost
Copy link

ghost commented Dec 29, 2022

Tagging subscribers to this area: @BrzVlad
See info in area-owners.md if you want to be subscribed.

Issue Details

This PR expands compare + brfalse/brtrue with single conditional branch opcode.

Author: kotlarmilos
Assignees: kotlarmilos
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@kotlarmilos kotlarmilos changed the title Expand compare + brfalse/brtrue with single conditional branch opcode [mono][interp] Expand compare + brfalse/brtrue with single conditional branch opcode Dec 29, 2022
@build-analysis build-analysis bot mentioned this pull request Dec 29, 2022
@kotlarmilos
Copy link
Member Author

Failure is #79874

@@ -9823,20 +9823,42 @@ interp_super_instructions (TransformData *td)
gboolean negate = opcode == MINT_BRFALSE_I4;
int cond_sreg = ins->sregs [0];
InterpInst *def = td->locals [cond_sreg].def;
if (def != NULL) {
if (def != NULL && td->local_ref_count [cond_sreg] == 1) {
Copy link
Member

Choose a reason for hiding this comment

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

you could use local_ref_count directly as below

@kotlarmilos kotlarmilos merged commit 7fa0d5b into dotnet:main Jan 3, 2023
@kotlarmilos kotlarmilos deleted the improvement/conditional-branches branch January 3, 2023 15:01
@dotnet dotnet locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants