mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Strength reduce i2f(doubleToInt32(x)) and u2f(doubleToUint32(x)) to x. This eliminate most of the on-trace overhead, but we still need type peeling of loop variable into int to win back the performance loss casting introduced.
This commit is contained in:
parent
bd6deef4fc
commit
312d176937
@ -210,6 +210,23 @@ public:
|
||||
LirWriter(out)
|
||||
{
|
||||
}
|
||||
|
||||
LInsp ins1(LOpcode v, LInsp s0)
|
||||
{
|
||||
switch (v) {
|
||||
case LIR_i2f:
|
||||
if (s0->oprnd1()->isCall() && s0->imm8() == F_doubleToInt32)
|
||||
return callArgN(s0->oprnd1(), 1);
|
||||
break;
|
||||
case LIR_u2f:
|
||||
if (s0->oprnd1()->isCall() && s0->imm8() == F_doubleToUint32)
|
||||
return callArgN(s0->oprnd1(), 1);
|
||||
break;
|
||||
default:
|
||||
JS_NOT_REACHED("ins1");
|
||||
}
|
||||
return out->ins1(v, s0);
|
||||
}
|
||||
|
||||
LInsp ins2(LOpcode v, LInsp s1, LInsp s0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user