From: pinskia Date: Tue, 6 Sep 2005 22:26:59 +0000 (+0000) Subject: 2005-09-06 Saurabh Verma X-Git-Tag: upstream/4.9.2~58770 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f27db36d31929f99df6efe403a9a0eed7394309;p=platform%2Fupstream%2Flinaro-gcc.git 2005-09-06 Saurabh Verma PR target/8972 * config/arc/arc.c (output_shift): Add check for loop count when optimizing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103971 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0eb165..96d6d60 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-09-06 Saurabh Verma + + PR target/8972 + * config/arc/arc.c (output_shift): Add check for loop count when + optimizing. + 2005-09-06 Steven Bosscher * tree-ssa-phiopt.c (conditional_replacement): Construct proper SSA diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 2adf01d..6d8666e 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -1494,7 +1494,11 @@ output_shift (rtx *operands) if (GET_CODE (operands[2]) != CONST_INT) { if (optimize) - output_asm_insn ("mov lp_count,%2", operands); + { + output_asm_insn ("sub.f 0,%2,0", operands); + output_asm_insn ("mov lp_count,%2", operands); + output_asm_insn ("bz 2f", operands); + } else output_asm_insn ("mov %4,%2", operands); goto shiftloop; @@ -1568,6 +1572,8 @@ output_shift (rtx *operands) fprintf (asm_out_file, "1:\t%s single insn loop\n", ASM_COMMENT_START); output_asm_insn (shift_one, operands); + fprintf (asm_out_file, "2:\t%s end single insn loop\n", + ASM_COMMENT_START); } else {