Commit 917ac7d4 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Improve range analysis for smi phi

R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/17498002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 29d34615
......@@ -1761,9 +1761,12 @@ Range* HConstant::InferRange(Zone* zone) {
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment