This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/50161] [4.7 Regression] wrong code with -fno-tree-ter and __builtin_popcountl


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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-23 15:51:55 UTC ---
Author: jakub
Date: Tue Aug 23 15:51:45 2011
New Revision: 177991

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177991
Log:
    PR middle-end/50161
    * simplify-rtx.c (simplify_const_unary_operation): If
    op is CONST_INT, don't look at op_mode, but use instead
    mode.
    * optabs.c (add_equal_note): For FFS, CLZ, CTZ,
    CLRSB, POPCOUNT, PARITY and BSWAP use operand mode for
    operation and TRUNCATE/ZERO_EXTEND if needed.
    * doc/rtl.texi (ffs, clrsb, clz, ctz, popcount, parity, bswap):
    Document that operand mode must be same as operation mode,
    or VOIDmode.
    * config/avr/avr.md (paritysi2, *parityqihi2.libgcc,
    *paritysihi2.libgcc, popcountsi2, *popcountsi2.libgcc,
    *popcountqihi2.libgcc, clzsi2, *clzsihi2.libgcc, ctzsi2,
    *ctzsihi2.libgcc, ffssi2, *ffssihi2.libgcc): For unary ops
    use the mode of operand for the operation and add truncate
    or zero_extend around if needed.
    * config/c6x/c6x.md (ctzdi2): Likewise.
    * config/bfin/bfin.md (clrsbsi2, signbitssi2): Likewise.

    * gcc.dg/pr50161.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr50161.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/avr/avr.md
    trunk/gcc/config/bfin/bfin.md
    trunk/gcc/config/c6x/c6x.md
    trunk/gcc/doc/rtl.texi
    trunk/gcc/optabs.c
    trunk/gcc/simplify-rtx.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]