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
This commit is contained in:
verwaest@chromium.org 2013-06-20 14:11:52 +00:00
parent 29d3461529
commit 917ac7d413

View File

@ -1761,9 +1761,12 @@ Range* HConstant::InferRange(Zone* zone) {
Range* HPhi::InferRange(Zone* zone) { Range* HPhi::InferRange(Zone* zone) {
if (representation().IsInteger32()) { Representation r = representation();
if (r.IsSmiOrInteger32()) {
if (block()->IsLoopHeader()) { 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; return range;
} else { } else {
Range* range = OperandAt(0)->range()->Copy(zone); Range* range = OperandAt(0)->range()->Copy(zone);