public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zdenek Dvorak <rakdver@kam.mff.cuni.cz>
To: Richard Guenther <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Rewrite store-motion and invariant motion to use an alias-oracle
Date: Wed, 19 Mar 2008 21:20:00 -0000	[thread overview]
Message-ID: <20080319205339.GA4302@kam.mff.cuni.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0803191634470.4133@zhemvz.fhfr.qr>

Hi,

> > > (maybe there's a better place to do it, but it really needs to be
> > > done on the leaf of expanded expressions).
> > 
> > right... still, this seems to be equivalent to transforming
> > 
> > unsigned char a, b;
> > 
> > (unsigned long) (a + b) to (unsigned long) a + (unsigned long) b
> > 
> > which is incorrect when a + b overflows?
> 
> Yes.  I was assuming the affine combinations are all address arithmetic
> where overflow is undefined or rather does not occur.

no, not necessarily.  However, you could call aff_combination_expand
with type = TREE_TYPE (TREE_OPERAND (e, 0)) and make it indicate whether
it expanded some possibly wrapping arithmetics or not, and in case it
did not, cast the result to TREE_TYPE (e).

> Of course unfortunately the ICE that blocks the patch in the first
> place is present with and without that change :/

I will have a look,

Zdenek

  reply	other threads:[~2008-03-19 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 14:57 Richard Guenther
2008-03-19 15:08 ` Zdenek Dvorak
2008-03-19 15:14   ` Richard Guenther
2008-03-19 15:38     ` Zdenek Dvorak
2008-03-19 18:21       ` Richard Guenther
2008-03-19 21:20         ` Zdenek Dvorak [this message]
2008-03-21  5:54         ` Zdenek Dvorak

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=20080319205339.GA4302@kam.mff.cuni.cz \
    --to=rakdver@kam.mff.cuni.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).