public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Pop <sebpop@gmail.com>
To: gcc-bugzilla@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: [Bug middle-end/42512] [4.5 Regression] integer wrong code bug  	with loop
Date: Fri, 08 Jan 2010 17:55:00 -0000	[thread overview]
Message-ID: <cb9d34b21001080954y6f28c8del6f673b02774987@mail.gmail.com> (raw)
In-Reply-To: <20100108172139.25590.qmail@sourceware.org>

> Ok, I have that fixed locally at the place of the patch but I wonder if
> initial_condition () shouldn't return for example
>
>  1ul for (unsigned long) { 1, +, 1 }_1
>

This is correct.

> and
>
>  (int) i_2 for (int) { i_2, +, 1 }_1
>
> and further (for short i_2)
>
>  i_2 for (short) { (int) { i_2, +, 1 }_2, +, 1 }_1
>
> ?  Can the latter two happen all?

Yes, these could happen, and you are right, we should see
the initial value of a chrec through the type conversion lenses.

> Is it even correct to talk about a
> general initial condition in this case?  Consider
>
>  { { 1, +, 1 }_2, +, 1 }_1
>
> initial_condition will return 1 for the chrec even though that is not
> correct because the initial condition is not constant in loop 1.

If you want, there is an initial condition for the loop_1 and that would be
{1, +, 1}_2, and there is an initial condition 1 for loop nest loop_2:

loop_2
  i = loop_2_phi (0, i+1) = {1, +, 1}_2
  loop_1
    j = loop_1_phi (i, j+1) = {{1, +, 1}_2, +, 1}_1

> I suppose I'd only see that if instantiating the chrec at the point
> where I placed the fix?  So I really only see at most a single outer
> conversion around the chrec?

Yes, I think that at most you can have only one conversion around a chrec.


  reply	other threads:[~2010-01-08 17:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-26 19:27 [Bug c/42512] New: possible integer wrong code bug regehr at cs dot utah dot edu
2009-12-26 20:00 ` [Bug middle-end/42512] [4.5 Regression] integer wrong code bug with loop jakub at gcc dot gnu dot org
2009-12-26 22:13 ` hjl dot tools at gmail dot com
2009-12-26 22:16 ` hjl dot tools at gmail dot com
2009-12-27 14:43 ` ebotcazou at gcc dot gnu dot org
2010-01-08 14:07 ` rguenth at gcc dot gnu dot org
2010-01-08 15:00 ` rguenth at gcc dot gnu dot org
2010-01-08 16:20 ` spop at gcc dot gnu dot org
2010-01-08 16:53 ` rguenth at gcc dot gnu dot org
2010-01-08 17:07 ` rguenth at gcc dot gnu dot org
2010-01-08 17:21 ` rguenth at gcc dot gnu dot org
2010-01-08 17:55   ` Sebastian Pop [this message]
2010-01-08 17:55 ` sebpop at gmail dot com
2010-01-09 12:04 ` rguenth at gcc dot gnu dot org
2010-01-09 12:04 ` rguenth at gcc dot gnu dot org
2010-02-07  4:49 ` hjl at gcc dot gnu dot org
     [not found] <bug-42512-4@http.gcc.gnu.org/bugzilla/>
2022-10-25 11:40 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb9d34b21001080954y6f28c8del6f673b02774987@mail.gmail.com \
    --to=sebpop@gmail.com \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-bugzilla@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).