Mercurial > hg > truffle
comparison src/share/vm/opto/phaseX.cpp @ 17936:968a17f18337
8042786: Proper fix for 8032566
Summary: Check for overflow cases in range checks and collapse it if we can.
Reviewed-by: jrose, iveresov
author | kvn |
---|---|
date | Fri, 16 May 2014 12:05:14 -0700 |
parents | de95063c0e34 |
children | 1555c0843770 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17936:968a17f18337 |
---|---|
1377 Node* u = use->fast_out(i2); | 1377 Node* u = use->fast_out(i2); |
1378 if (u->Opcode() == Op_RShiftI) | 1378 if (u->Opcode() == Op_RShiftI) |
1379 _worklist.push(u); | 1379 _worklist.push(u); |
1380 } | 1380 } |
1381 } | 1381 } |
1382 // If changed AddI/SubI inputs, check CmpU for range check optimization. | |
1383 if (use_op == Op_AddI || use_op == Op_SubI) { | |
1384 for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) { | |
1385 Node* u = use->fast_out(i2); | |
1386 if (u->is_Cmp() && (u->Opcode() == Op_CmpU)) { | |
1387 _worklist.push(u); | |
1388 } | |
1389 } | |
1390 } | |
1382 // If changed AddP inputs, check Stores for loop invariant | 1391 // If changed AddP inputs, check Stores for loop invariant |
1383 if( use_op == Op_AddP ) { | 1392 if( use_op == Op_AddP ) { |
1384 for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) { | 1393 for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) { |
1385 Node* u = use->fast_out(i2); | 1394 Node* u = use->fast_out(i2); |
1386 if (u->is_Mem()) | 1395 if (u->is_Mem()) |