https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104686

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index 957604b22e9..7465af72e98 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -1379,8 +1379,9 @@ ira_object_conflict_iter_cond
(ira_object_conflict_iterator *i,
        }

       /* Skip bits that are zero.  */
-      for (; (word & 1) == 0; word >>= 1)
-       bit_num++;
+      int off = ctz_hwi (word);
+      bit_num += off;
+      word >>= off;

       obj = ira_object_id_map[bit_num + i->base_conflict_id];
       i->bit_num = bit_num + 1;


improves compile-time from 31s to 24s for the full preprocessed source with
-fno-vect-cost-model.

Reply via email to