From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7876 invoked by alias); 3 Sep 2014 17:11:43 -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 7754 invoked by uid 48); 3 Sep 2014 17:11:39 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61559] FAIL: gcc.dg/builtin-bswap-8.c on i686 with -mmovbe Date: Wed, 03 Sep 2014 17:11: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc component everconfirmed 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-09/txt/msg00984.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61559 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-09-03 CC| |rguenth at gcc dot gnu.org Component|rtl-optimization |tree-optimization Ever confirmed|0 |1 --- Comment #5 from Uro=C5=A1 Bizjak --- (In reply to Eric Botcazou from comment #4) > I guess the transformations should accept MEMs instead of just REGs but, = no, > I'm not particularly interested in quirks of CISC architectures, I have > enough to do with those of RISC architectures. The problem is that with both function arguments in memory, combine simplif= ies sequence of bswaps with memory argument ( =3D=3D movbe) in foo7 to: Failed to match this instruction: (set (reg:SI 84 [ D.2318 ]) (xor:SI (mem/c:SI (plus:SI (reg/f:SI 16 argp) (const_int 4 [0x4])) [2 b+0 S4 A32]) (mem/c:SI (reg/f:SI 16 argp) [2 a+0 S4 A32]))) This is invalid RTX, where both input arguments are in memory. The optimized tree dump for foo7 is: : _2 =3D __builtin_bswap32 (a_1(D)); _4 =3D __builtin_bswap32 (b_3(D)); _5 =3D _4 ^ _2; _6 =3D __builtin_bswap32 (_5); [tail call] return _6; It looks to me that the optimization has to be re-implemented as tree optimization (probably by extending fold_builtin_bswap in builtins.c). This generic optimization will also benefit targets without bswap RTX pattern, e= .g. plain i386, as observed in Comment #2. I'm recategorizing the PR as a tree-optimization. >>From gcc-bugs-return-461151-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Sep 03 17:15:04 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 12301 invoked by alias); 3 Sep 2014 17:15:02 -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 12219 invoked by uid 48); 3 Sep 2014 17:14:57 -0000 From: "dje at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/63156] web can't handle AUTOINC correctly Date: Wed, 03 Sep 2014 17:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dje 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed 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-09/txt/msg00985.txt.bz2 Content-length: 547 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63156 David Edelsohn changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-09-03 CC| |dje at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from David Edelsohn --- Confirmed.