Index: src/crankshaft/x64/lithium-codegen-x64.cc |
diff --git a/src/crankshaft/x64/lithium-codegen-x64.cc b/src/crankshaft/x64/lithium-codegen-x64.cc |
index e520bf79b6b4aecdacc3db03c00f77558b1c7eaf..7b0443ebf92ca2c9782cdcc30280226b46624ac3 100644 |
--- a/src/crankshaft/x64/lithium-codegen-x64.cc |
+++ b/src/crankshaft/x64/lithium-codegen-x64.cc |
@@ -2065,6 +2065,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; |
@@ -5189,6 +5195,17 @@ |
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); \ |
+ __ CompareRoot(FieldOperand(input, HeapObject::kMapOffset), \ |
+ Heap::k##Type##MapRootIndex); \ |
+ final_branch_condition = equal; |
+ SIMD128_TYPES(SIMD128_TYPE) |
+#undef SIMD128_TYPE |
+ // clang-format on |
+ |
} else { |
__ jmp(false_label, false_distance); |
} |