From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3871 invoked by alias); 20 Nov 2014 10:09:14 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3813 invoked by uid 48); 20 Nov 2014 10:09:10 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/63966] [5 regression] inconsistent operand constraints compiling build libcpp Date: Thu, 20 Nov 2014 10:09:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg02163.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63966 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek --- (In reply to Uro=C5=A1 Bizjak from comment #5) > Can you please test this patch: >=20 > --cut here-- > Index: lex.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- lex.c (revision 217789) > +++ lex.c (working copy) > @@ -471,7 +471,11 @@ >=20=20 > /* Check the CPU capabilities. */ >=20=20 > +#if (GCC_VERSION >=3D 5000) > #include "../gcc/config/i386/cpuid.h" > +#else > +#include > +#endif >=20=20 > typedef const uchar * (*search_line_fast_type) (const uchar *, const uch= ar > *); > static search_line_fast_type search_line_fast; > --cut here-- That assumes there is provided by the system compiler. The code is guarded with #if (GCC_VERSION >=3D 4005) && (defined(__i386__) || defined(__x86_64__)) && !(defined(__sun__) && defined(__svr4__)) but doesn't clang and icc pretend to be some versions of GCC? I think better would be to include #include "../gcc/config/i386/cpuid.h" only if GCC_VERSION >=3D 5000 (or perhaps that or __PIC__ not defined or __x86_64__ defined), and otherwise not use __get_cpuid at all, just statica= lly decide based on minimum value. >>From gcc-bugs-return-467693-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 20 10:21:27 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11603 invoked by alias); 20 Nov 2014 10:21:26 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 11568 invoked by uid 48); 20 Nov 2014 10:21:23 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63986] [5 Regression][SH] gcc.target/sh/pr51244-15.c failures Date: Thu, 20 Nov 2014 10:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg02165.txt.bz2 Content-length: 2042 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63986 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW CC| |ppalka at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #3 from Richard Biener --- Ok, now already existing forwprop code gets fed with : _3 = a_2(D) == 0; x_4 = (char) _3; _7 = ~_3; _8 = (int) _7; MEM[(int *)d_5(D) + 8B] = _8; if (x_4 != 0) where we now in the first forwprop pass identified the opportunity to use ~_3 instead of x_4 == 0 thus x_4 is now no longer multi-use. This makes us optimize if (x_4 != 0) to if (_3 != 0) which we re-optimize in fold_gimple_cond now to '_3' and then of course if (_3 != 0) (err, and we return "changed"....) which means we now propagate _again_ via forward_propagate_into_gimple_cond which now specifically allows aggressive forwarding of compares, bypassing single-use restrictions. See 2014-11-16 Patrick Palka PR middle-end/63790 * tree-ssa-forwprop.c (forward_propagate_into_comparison_1): Always combine comparisons or conversions from booleans. thus me fixing my "mistake" does not help anymore. I suppose RTL CSE cannot CSE flag register sets...? Btw, my previous comment was incorrect - the code is what is now produced on trunk while on the 4.9 branch we create test_0: .LFB0: .cfi_startproc testl %edi, %edi movl %edx, %eax sete %r8b movl %r8d, %edi xorl $1, %edi testb %r8b, %r8b movzbl %dil, %edi cmovne %esi, %eax movl %edi, 8(%rcx) ret which means code generation improved for x86...