[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #16 from Jakub Jelinek --- Author: jakub Date: Mon Nov 28 19:15:51 2016 New Revision: 242929 URL: https://gcc.gnu.org/viewcvs?rev=242929&root=gcc&view=rev Log: PR rtl-optimization/78546 * simplify-rtx.c (neg_const_int

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #15 from rguenther at suse dot de --- On Mon, 28 Nov 2016, zsojka at seznam dot cz wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 > > --- Comment #14 from Zdenek Sojka --- > (In reply to Jakub Jelinek from comment #12)

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #14 from Zdenek Sojka --- (In reply to Jakub Jelinek from comment #12) > Therefore the comment should be > /* CST1 - (CST2 - A) -> (CST1 - CST2) - A */ > rather than > /* CST - (CST - A) -> CST - A */ How comes it is not "CST1 - (C

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #13 from rguenther at suse dot de --- On Mon, 28 Nov 2016, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 > > --- Comment #12 from Jakub Jelinek --- > Therefore the comment should be > /* CST1

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #12 from Jakub Jelinek --- Therefore the comment should be /* CST1 - (CST2 - A) -> (CST1 - CST2) - A */ rather than /* CST - (CST - A) -> CST - A */

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #11 from rguenther at suse dot de --- On Mon, 28 Nov 2016, mpolacek at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 > > Marek Polacek changed: > >What|Removed |Add

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #9 from Richard Biener --- Testing diff --git a/gcc/match.pd b/gcc/match.pd index 2d4e019..9e5df64 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -1216,6 +1216,13 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (if (cst && !TREE_OVERF

[Bug rtl-optimization/78546] [6/7 Regression] wrong code at -O2 and above

2016-11-28 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78546 --- Comment #8 from Jakub Jelinek --- Created attachment 40174 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40174&action=edit gcc7-pr78546.patch Untested fix for 2), i.e. the wrong-code bug. For 1), i.e. the optimization regression, I t