You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Dmitry Pronichkin (JIRA)" <ji...@apache.org> on 2008/03/20 11:09:24 UTC

[jira] Commented: (HARMONY-5597) [drlvm][jit][opt] Branch Translator zero comparison improvement

    [ https://issues.apache.org/jira/browse/HARMONY-5597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12580716#action_12580716 ] 

Dmitry Pronichkin commented on HARMONY-5597:
--------------------------------------------

I want to suggest generalization of this branch elimination technique.
We can work on the following pattern:
if ( x < x1 ) { // or if (x1 > x)
  a = a0;
}
else {
  a = a1;
}

transforming it into code like this:
tmp = (x - x1) >> 31;
a = (a0 & tmp) | (a1 & !tmp);

This will fully cover the idea of sign check elimination.

> [drlvm][jit][opt] Branch Translator zero comparison improvement
> ---------------------------------------------------------------
>
>                 Key: HARMONY-5597
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5597
>             Project: Harmony
>          Issue Type: Improvement
>            Reporter: George Timoshenko
>            Assignee: Mikhail Fursov
>            Priority: Minor
>
> In the implementation of branch translator enhancement (HARMONY-5580)
> prevInst - can be lookuped more carefully than just:
> Inst * prevInst = inst->getPrevInst();
> +
> +                    if (prevInst && falseInst)
> There can be some insts that do not affect FALGS between CMP and BRANCH.
> And it is also correct when CMP belongs to another BB that is prior to the BRANCH's one. (the only restriction is: FLAGS are safe from CMP to BRANCH)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.