Index: src/crankshaft/ia32/lithium-codegen-ia32.cc |
diff --git a/src/crankshaft/ia32/lithium-codegen-ia32.cc b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
index 55fde013282d2e0a7fd5ea27ca086a54113a7566..29baf25c87607242ecdaf712003bae62ab783ca9 100644 |
--- a/src/crankshaft/ia32/lithium-codegen-ia32.cc |
+++ b/src/crankshaft/ia32/lithium-codegen-ia32.cc |
@@ -1927,6 +1927,12 @@ |
__ j(equal, instr->TrueLabel(chunk_)); |
} |
+ if (expected & ToBooleanHint::kSimdValue) { |
+ // SIMD value -> true. |
+ __ CmpInstanceType(map, SIMD128_VALUE_TYPE); |
+ __ j(equal, instr->TrueLabel(chunk_)); |
+ } |
+ |
if (expected & ToBooleanHint::kHeapNumber) { |
// heap number -> false iff +0, -0, or NaN. |
Label not_heap_number; |
@@ -4907,6 +4913,18 @@ |
__ test_b(FieldOperand(input, Map::kBitFieldOffset), |
Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
final_branch_condition = zero; |
+ |
+// clang-format off |
+#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
+ } else if (String::Equals(type_name, factory()->type##_string())) { \ |
+ __ JumpIfSmi(input, false_label, false_distance); \ |
+ __ cmp(FieldOperand(input, HeapObject::kMapOffset), \ |
+ factory()->type##_map()); \ |
+ final_branch_condition = equal; |
+ SIMD128_TYPES(SIMD128_TYPE) |
+#undef SIMD128_TYPE |
+ // clang-format on |
+ |
} else { |
__ jmp(false_label, false_distance); |
} |