Revision: 15247
Author:   [email protected]
Date:     Thu Jun 20 07:11:52 2013
Log:      Improve range analysis for smi phi

[email protected]

Review URL: https://chromiumcodereview.appspot.com/17498002
http://code.google.com/p/v8/source/detail?r=15247

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Jun 20 06:51:03 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Jun 20 07:11:52 2013
@@ -1761,9 +1761,12 @@


 Range* HPhi::InferRange(Zone* zone) {
-  if (representation().IsInteger32()) {
+  Representation r = representation();
+  if (r.IsSmiOrInteger32()) {
     if (block()->IsLoopHeader()) {
-      Range* range = new(zone) Range(kMinInt, kMaxInt);
+      Range* range = r.IsSmi()
+          ? new(zone) Range(Smi::kMinValue, Smi::kMaxValue)
+          : new(zone) Range(kMinInt, kMaxInt);
       return range;
     } else {
       Range* range = OperandAt(0)->range()->Copy(zone);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to