Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index c65b1ddbf33f21e267e768cc2546c09f8f5e98ba..b45917e82ffda33a5ead6a9af4774f8105f7ee7e 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2208,6 +2208,12 @@ void LCodeGen::DoBranch(LBranch* instr) { |
__ j(equal, instr->TrueLabel(chunk_)); |
} |
+ if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { |
+ // SIMD value -> true. |
+ __ CmpInstanceType(map, FLOAT32X4_TYPE); |
+ __ j(equal, instr->TrueLabel(chunk_)); |
+ } |
+ |
if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
// heap number -> false iff +0, -0, or NaN. |
Label not_heap_number; |
@@ -5711,6 +5717,11 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) { |
Immediate(1 << Map::kIsUndetectable)); |
final_branch_condition = zero; |
+ } else if (String::Equals(type_name, factory->float32x4_string())) { |
+ __ JumpIfSmi(input, false_label, false_distance); |
+ __ CmpObjectType(input, FLOAT32X4_TYPE, input); |
+ final_branch_condition = equal; |
+ |
} else { |
__ jmp(false_label, false_distance); |
} |