[JSC] Make ArithClz32 work with Cell arguments
[WebKit-https.git] / Source / JavaScriptCore / dfg / DFGClobberize.h
index b1a79e0..d5adc3d 100644 (file)
@@ -149,7 +149,6 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
         return;
         
     case ArithIMul:
-    case ArithClz32:
     case ArithMin:
     case ArithMax:
     case ArithPow:
@@ -206,6 +205,15 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
         }
         return;
 
+    case ArithClz32:
+        if (node->child1().useKind() == Int32Use || node->child1().useKind() == KnownInt32Use)
+            def(PureValue(node));
+        else {
+            read(World);
+            write(Heap);
+        }
+        return;
+
     case BitAnd:
     case BitOr:
     case BitXor: