aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/c6x
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-08-23 17:51:45 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-08-23 17:51:45 +0200
commite2f008377225f76538d728cb16772e29091feb0f (patch)
tree62fb2f1d429ec029087fc74ce2fd3609e593cd39 /gcc/config/c6x
parente70e0b60724694c40064580368e5b93aae951842 (diff)
downloadgcc-e2f008377225f76538d728cb16772e29091feb0f.zip
gcc-e2f008377225f76538d728cb16772e29091feb0f.tar.gz
gcc-e2f008377225f76538d728cb16772e29091feb0f.tar.bz2
re PR middle-end/50161 (wrong code with -fno-tree-ter and __builtin_popcountl)
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. From-SVN: r177991
Diffstat (limited to 'gcc/config/c6x')
-rw-r--r--gcc/config/c6x/c6x.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/c6x/c6x.md b/gcc/config/c6x/c6x.md
index e8e15b2..4554cd0 100644
--- a/gcc/config/c6x/c6x.md
+++ b/gcc/config/c6x/c6x.md
@@ -2014,7 +2014,7 @@
(define_expand "ctzdi2"
[(set (match_operand:DI 0 "register_operand" "")
- (ctz:SI (match_operand:DI 1 "register_operand" "")))]
+ (ctz:DI (match_operand:DI 1 "register_operand" "")))]
"TARGET_INSNS_64"
{
rtx tmpreg = gen_reg_rtx (DImode);