Upstream version 10.39.233.0
[platform/framework/web/crosswalk.git] / src / v8 / src / hydrogen-representation-changes.cc
index ebb03b5..83a9abe 100644 (file)
@@ -36,8 +36,19 @@ void HRepresentationChangesPhase::InsertRepresentationChangeForUse(
   }
 
   if (new_value == NULL) {
-    new_value = new(graph()->zone()) HChange(
-        value, to, is_truncating_to_smi, is_truncating_to_int);
+    if (((to.IsFloat32x4() || to.IsFloat64x2() || to.IsInt32x4()) &&
+         !value->representation().IsTagged()) ||
+        ((value->representation().IsFloat32x4() ||
+          value->representation().IsFloat64x2() ||
+          value->representation().IsInt32x4()) &&
+         !to.IsTagged())) {
+      new_value = HUnarySIMDOperation::New(graph()->zone(),
+          graph()->entry_block()->last_environment()->context(),
+          value, kSIMD128Change, to);
+    } else {
+      new_value = new(graph()->zone()) HChange(
+          value, to, is_truncating_to_smi, is_truncating_to_int);
+    }
     if (!use_value->operand_position(use_index).IsUnknown()) {
       new_value->set_position(use_value->operand_position(use_index));
     } else {