http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29776

sgunderson at bigfoot dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sgunderson at bigfoot dot com

--- Comment #6 from sgunderson at bigfoot dot com ---
Without knowing anything about the GCC internals here, I could perhaps also
point out that GCC should know that these have limited range. As a trivial
example:

int foo(int x)
{
        int z = __builtin_ctz(x);
        if (z > 2000) {
                return 1;
        } else {
                return 0;
        }
}

There's no way this function can return anything but 0, and VRP should probably
be taught that. (I wonder if this would fix the unneccessary sign extension
too?)

Reply via email to