Skip to content

Commit aa354bf

Browse files
committed
Only do float type specialization if both sources are number
1 parent 4b72289 commit aa354bf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Backend/GlobOpt.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10648,6 +10648,11 @@ GlobOpt::TypeSpecializeFloatBinary(IR::Instr *instr, Value *src1Val, Value *src2
1064810648
case Js::OpCode::CmGe_A:
1064910649
case Js::OpCode::CmGt_A:
1065010650
{
10651+
if (src1Val->GetValueInfo()->IsNotNumber() || src2Val->GetValueInfo()->IsNotNumber())
10652+
{
10653+
return false;
10654+
}
10655+
1065110656
convertDstToBool = true;
1065210657
break;
1065310658
}

0 commit comments

Comments
 (0)