From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20661 invoked by alias); 26 Jun 2002 17:56:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20620 invoked by uid 71); 26 Jun 2002 17:56:01 -0000 Date: Wed, 26 Jun 2002 12:58:00 -0000 Message-ID: <20020626175601.20619.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Richard Henderson Subject: Re: optimization/7120: Run once loop should *always* be unrolled Reply-To: Richard Henderson X-SW-Source: 2002-06/txt/msg00635.txt.bz2 List-Id: The following reply was made to PR optimization/7120; it has been noted by GNATS. From: Richard Henderson To: davem@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, rusty@rustcorp.com.au, gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Subject: Re: optimization/7120: Run once loop should *always* be unrolled Date: Wed, 26 Jun 2002 10:54:53 -0700 On Wed, Jun 26, 2002 at 06:02:10PM +0930, Alan Modra wrote: > + if (((INTVAL (initial_value) + INTVAL (increment)) > + & (((unsigned HOST_WIDE_INT) 1 > + << (GET_MODE_BITSIZE (GET_MODE (iteration_var)) - 1) > + << 1) - 1)) == INTVAL (final_value)) Need to use gen_int_mode here and for the final_value calulation. Suggest something like rtx incone = gen_int_mode (INTVAL (initial_value) + INTVAL (increment), GET_MODE (iteration_var)); if (incone == final_value) { ... } else { loop_info->n_iterations = 1; loop_info->final_value = incone; loop_info->final_equiv_value = incone; return 1; } r~