public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/58143] [4.8/4.9 regression] wrong code at -O3
Date: Tue, 15 Oct 2013 09:05:00 -0000	[thread overview]
Message-ID: <bug-58143-4-WMP8n0aSgG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-58143-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58143

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 31008
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31008&action=edit
untested patch

This is the alternative approach, re-writing stmts to a variant that does not
exhibit undefined signed overflow.

Division is not covered, neither is ABS_EXPR (or __builtin_abs ()).  For
both I cannot see an easy way to rewrite them but make their execution
conditional (that requires more infrastructure changes in LIM though).

The patch should cover usual cases though, a testcase showing the issue
remaining with division and ABS_EXPR is appreciated (as SCEV analysis
only can do sensible stuff with +- and * it shouldn't be possible to
trigger a bug with the unrolling code - but clearly VRP could be
tricked into some invalid transform as it also handles division and
absolute).

POINTER_PLUS_EXPR handling also needs to be added, though that's one that
will eventually exhibit code generation regressions.  But who knows ...
(testcase for POINTER_PLUS_EXPR also welcome).


  parent reply	other threads:[~2013-10-15  9:05 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13  0:05 [Bug middle-end/58143] New: wrong code at -O3 on x86_64-linux-gnu su at cs dot ucdavis.edu
2013-08-13  0:08 ` [Bug middle-end/58143] " pinskia at gcc dot gnu.org
2013-08-13  0:24 ` su at cs dot ucdavis.edu
2013-08-14 21:11 ` mikpe at it dot uu.se
2013-08-20  0:21 ` bernd.edlinger at hotmail dot de
2013-08-20  0:59 ` bernd.edlinger at hotmail dot de
2013-08-20 22:25 ` bernd.edlinger at hotmail dot de
2013-08-21  8:53 ` bernd.edlinger at hotmail dot de
2013-08-21 17:41 ` [Bug tree-optimization/58143] [4.8/4.9 regression] wrong code at -O3 ebotcazou at gcc dot gnu.org
2013-08-21 18:02 ` jakub at gcc dot gnu.org
2013-08-21 21:50 ` bernd.edlinger at hotmail dot de
2013-08-23  9:15 ` bernd.edlinger at hotmail dot de
2013-08-23  9:16 ` jakub at gcc dot gnu.org
2013-08-23 12:08 ` bernd.edlinger at hotmail dot de
2013-08-23 12:59 ` jakub at gcc dot gnu.org
2013-08-25 22:08 ` bernd.edlinger at hotmail dot de
2013-08-28 21:30 ` bernd.edlinger at hotmail dot de
2013-10-15  8:15 ` rguenth at gcc dot gnu.org
2013-10-15  8:17 ` rguenth at gcc dot gnu.org
2013-10-15  8:39 ` bernd.edlinger at hotmail dot de
2013-10-15  9:05 ` rguenth at gcc dot gnu.org [this message]
2013-10-15  9:41 ` rguenth at gcc dot gnu.org
2013-10-15 11:03 ` rguenth at gcc dot gnu.org
2013-10-15 11:45 ` bernd.edlinger at hotmail dot de
2013-10-15 11:54 ` rguenth at gcc dot gnu.org
2013-10-15 11:54 ` rguenther at suse dot de
2013-10-15 13:21 ` bernd.edlinger at hotmail dot de
2013-10-15 13:27 ` rguenther at suse dot de
2013-10-15 13:36 ` mikpelinux at gmail dot com
2013-10-15 13:38 ` bernd.edlinger at hotmail dot de
2013-10-15 13:40 ` rguenther at suse dot de
2013-10-16  9:51 ` jakub at gcc dot gnu.org
2013-10-17  9:59 ` rguenth at gcc dot gnu.org
2013-10-17 10:08 ` [Bug tree-optimization/58143] [4.8 " rguenth at gcc dot gnu.org
2013-11-18 15:14 ` rguenth at gcc dot gnu.org
2013-11-18 15:15 ` rguenth 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=bug-58143-4-WMP8n0aSgG@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).