]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
slight improvement there graphitemaster/liveness-bitfields
authorWolfgang Bumiller <wry.git@bumiller.com>
Tue, 15 Apr 2014 08:31:25 +0000 (10:31 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Tue, 15 Apr 2014 08:31:25 +0000 (10:31 +0200)
ir.c

diff --git a/ir.c b/ir.c
index f8a9d28605a610061923decb693d6bf4b22e2492..90dff4c93ef9dbd518cc84b3daa36e902fb5c16d 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -2529,6 +2529,8 @@ static GMQCC_INLINE size_t ir_bitlist_find_first(const ir_bitlist_t *self)
     /* FIXME: optimize? only executed when a warning is issued though... */
     for (i = 0; i != size; ++i) {
         size_t bit;
+        if (!self->bits[i])
+            continue;
         for (bit = 0; bit != GMQCC_BL_BITS; ++bit) {
             if (self->bits[i] & (1<<bit))
                 return bit + i*GMQCC_BL_BITS;