| Index: src/crankshaft/x87/lithium-codegen-x87.cc
|
| diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc
|
| index e7ced921ef31f7b9ec528b00e3efd480b00c174a..bf39b7f84eda6d5fab54dc72754c0df99a493bdc 100644
|
| --- a/src/crankshaft/x87/lithium-codegen-x87.cc
|
| +++ b/src/crankshaft/x87/lithium-codegen-x87.cc
|
| @@ -2452,9 +2452,15 @@ void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
|
| DCHECK(ToRegister(instr->left()).is(edx));
|
| DCHECK(ToRegister(instr->right()).is(eax));
|
|
|
| - Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
|
| - CallCode(code, RelocInfo::CODE_TARGET, instr);
|
| - __ test(eax, eax);
|
| + if (Token::IsOrderedRelationalCompareOp(instr->op())) {
|
| + Handle<Code> code = CodeFactory::StringCompare(isolate()).code();
|
| + CallCode(code, RelocInfo::CODE_TARGET, instr);
|
| + __ test(eax, eax);
|
| + } else {
|
| + Handle<Code> code = CodeFactory::StringEqual(isolate()).code();
|
| + CallCode(code, RelocInfo::CODE_TARGET, instr);
|
| + __ CompareRoot(eax, Heap::kTrueValueRootIndex);
|
| + }
|
|
|
| EmitBranch(instr, ComputeCompareCondition(instr->op()));
|
| }
|
|
|