Index: src/crankshaft/ppc/lithium-codegen-ppc.cc |
diff --git a/src/crankshaft/ppc/lithium-codegen-ppc.cc b/src/crankshaft/ppc/lithium-codegen-ppc.cc |
index a16c92decb4fc08d05f03b3eb408afef9ddad289..d697ec45d41cb6b71fb87a9d261433ba68486a68 100644 |
--- a/src/crankshaft/ppc/lithium-codegen-ppc.cc |
+++ b/src/crankshaft/ppc/lithium-codegen-ppc.cc |
@@ -2424,9 +2424,15 @@ void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
DCHECK(ToRegister(instr->left()).is(r4)); |
DCHECK(ToRegister(instr->right()).is(r3)); |
- Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
- CallCode(code, RelocInfo::CODE_TARGET, instr); |
- __ cmpi(r3, Operand::Zero()); |
+ if (Token::IsOrderedRelationalCompareOp(instr->op())) { |
+ Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
+ CallCode(code, RelocInfo::CODE_TARGET, instr); |
+ __ cmpi(r3, Operand::Zero()); |
+ } else { |
+ Handle<Code> code = CodeFactory::StringEqual(isolate()).code(); |
+ CallCode(code, RelocInfo::CODE_TARGET, instr); |
+ __ CompareRoot(r3, Heap::kTrueValueRootIndex); |
+ } |
EmitBranch(instr, ComputeCompareCondition(instr->op())); |
} |