File tree 1 file changed +4
-10
lines changed
1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -2563,11 +2563,8 @@ void PhaseMacroExpand::eliminate_macro_nodes() {
2563
2563
bool progress = true ;
2564
2564
while (progress) {
2565
2565
progress = false ;
2566
- for (int i = C->macro_count (); i > 0 ; i--) {
2567
- if (i > C->macro_count ()) {
2568
- i = C->macro_count (); // more than 1 element can be eliminated at once
2569
- }
2570
- Node* n = C->macro_node (i-1 );
2566
+ for (int i = C->macro_count (); i > 0 ; i = MIN2 (i - 1 , C->macro_count ())) { // more than 1 element can be eliminated at once
2567
+ Node* n = C->macro_node (i - 1 );
2571
2568
bool success = false ;
2572
2569
DEBUG_ONLY (int old_macro_count = C->macro_count ();)
2573
2570
if (n->is_AbstractLock ()) {
@@ -2582,11 +2579,8 @@ void PhaseMacroExpand::eliminate_macro_nodes() {
2582
2579
progress = true ;
2583
2580
while (progress) {
2584
2581
progress = false ;
2585
- for (int i = C->macro_count (); i > 0 ; i--) {
2586
- if (i > C->macro_count ()) {
2587
- i = C->macro_count (); // more than 1 element can be eliminated at once
2588
- }
2589
- Node* n = C->macro_node (i-1 );
2582
+ for (int i = C->macro_count (); i > 0 ; i = MIN2 (i - 1 , C->macro_count ())) { // more than 1 element can be eliminated at once
2583
+ Node* n = C->macro_node (i - 1 );
2590
2584
bool success = false ;
2591
2585
DEBUG_ONLY (int old_macro_count = C->macro_count ();)
2592
2586
switch (n->class_id ()) {
You can’t perform that action at this time.
0 commit comments