public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Use proper type in linear transformation in tree-switch-conversion (PR tree-optimization/88753).
Date: Tue, 08 Jan 2019 13:08:00 -0000	[thread overview]
Message-ID: <20190108130835.GB30353@tucnak> (raw)
In-Reply-To: <20190108125235.GA30353@tucnak>

On Tue, Jan 08, 2019 at 01:52:35PM +0100, Jakub Jelinek wrote:
> > 2019-01-08  Martin Liska  <mliska@suse.cz>
> > 
> > 	PR tree-optimization/88753
> > 	* tree-switch-conversion.c (switch_conversion::build_one_array):
> > 	Come up with local variable constructor.  Convert first to
> > 	type of constructor values.
> 
> Why is the testcase missing?

Oh, one more thing.  What happens if the index is wider (higher precision)
than the type of the constructor elts?  At least for the two_value_replacement
optimization in phiopt, I'm using the wider of the two types for the
arithmetics (conditionally unsigned if not proven not to overflow).
Shouldn't that be the case in this optimization too?

With using just the constructor elt type, do you count on the analysis to
fail if starting with casting the index to the elt type (or unsigned variant
thereof) affects the computation?

	Jakub

  reply	other threads:[~2019-01-08 13:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 12:40 Martin Liška
2019-01-08 12:52 ` Jakub Jelinek
2019-01-08 13:08   ` Jakub Jelinek [this message]
2019-01-08 13:56     ` Martin Liška
2019-01-08 14:15       ` Jakub Jelinek
2019-01-08 14:25         ` Martin Liška
2019-01-08 13:09   ` Martin Liška
2019-01-08 13:50     ` Jakub Jelinek
2019-01-08 13:57       ` Martin Liška
2019-01-08 14:41         ` Martin Liška

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=20190108130835.GB30353@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /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).