public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ka_bena at yahoo dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/67668] erroneous type argument for unary operator one's complement Date: Tue, 22 Sep 2015 16:51:00 -0000 [thread overview] Message-ID: <bug-67668-4-wuVT3foy8R@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67668-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668 --- Comment #4 from BENAÏSSA <ka_bena at yahoo dot fr> --- Thank you for your quick and clear reply . Note: I think that using the same symbol operator for doing two different things can be a potential source of blind errors. I confirm that this is only a personnal point of view. A.Benaïssa Le Lundi 21 septembre 2015 15h41, manu at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org> a écrit : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67668 Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |manu at gcc dot gnu.org Resolution|--- |INVALID --- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- Marc is right: The operator ‘~’ performs complex conjugation when used on a value with a complex type. This is a GNU extension; for values of floating type, you should use the ISO C99 functions conjf, conj and conjl, declared in <complex.h> and also provided as built-in functions by GCC. test.c:3:3: warning: ISO C does not support ‘~’ for complex conjugation [-Wpedantic] ~( 1. + 0.i ) ; ^ >From gcc-bugs-return-497820-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 22 17:04:08 2015 Return-Path: <gcc-bugs-return-497820-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 64005 invoked by alias); 22 Sep 2015 17:04:08 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 63971 invoked by uid 55); 22 Sep 2015 17:04:04 -0000 From: "ka_bena at yahoo dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/67667] erroneous type argument for unary operator one's complement Date: Tue, 22 Sep 2015 17:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ka_bena at yahoo dot fr X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE 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: Message-ID: <bug-67667-4-7L3j90HYly@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-67667-4@http.gcc.gnu.org/bugzilla/> References: <bug-67667-4@http.gcc.gnu.org/bugzilla/> 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: 2015-09/txt/msg01798.txt.bz2 Content-length: 1317 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67667 --- Comment #2 from BENAÏSSA <ka_bena at yahoo dot fr> --- Thank you for your quick and clear reply . Note: I think that using the same symbol operato as GNU extension for doing two different things can be a potential source of blind errors . I confirm that this is only a personnal point of view. A.Benaïssa Le Lundi 21 septembre 2015 13h29, redi at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org> a écrit : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67667 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- . *** This bug has been marked as a duplicate of bug 67668 *** >From gcc-bugs-return-497821-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Sep 22 17:05:38 2015 Return-Path: <gcc-bugs-return-497821-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 65187 invoked by alias); 22 Sep 2015 17:05:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 65154 invoked by uid 48); 22 Sep 2015 17:05:34 -0000 From: "alalaw01 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67682] New: Missed vectorization: (another) straight-line memcpy/memset not vectorized when equivalent loop is Date: Tue, 22 Sep 2015 17:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alalaw01 at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcctarget Message-ID: <bug-67682-4@http.gcc.gnu.org/bugzilla/> 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: 2015-09/txt/msg01799.txt.bz2 Content-length: 2373 https://gcc.gnu.org/bugzilla/show_bug.cgi?idg682 Bug ID: 67682 Summary: Missed vectorization: (another) straight-line memcpy/memset not vectorized when equivalent loop is Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: alalaw01 at gcc dot gnu.org Target Milestone: --- Target: aarch64 This code: void test (int*__restrict a, int*__restrict b) { a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; a[4] = 0; a[5] = 0; a[6] = 0; a[7] = 0; } is not vectorized; -fdump-tree-slp-details reveals test.c:4:13: note: Build SLP failed: different operation in stmt MEM[(int *)a_4( D) + 28B] = 0; test.c:4:13: note: original stmt *a_4(D) = _3; test.c:4:13: note: === vect_slp_analyze_data_ref_dependences ==test.c:4:13: note: === vect_slp_analyze_operations ==test.c:4:13: note: not vectorized: bad operation in basic block. test.c:4:13: note: ***** Re-trying analysis with vector size 8 ... test.c:4:13: note: Build SLP failed: different operation in stmt MEM[(int *)a_4(D) + 28B] = 0; test.c:4:13: note: original stmt *a_4(D) = _3; test.c:4:13: note: === vect_slp_analyze_data_ref_dependences ==test.c:4:13: note: === vect_slp_analyze_operations ==test.c:4:13: note: not vectorized: bad operation in basic block. (the failure with vector size 8 is expected, but vector size 4 should succeed) Output is: test: ldp w4, w3, [x1] ldp w2, w1, [x1, 8] stp w4, w3, [x0] stp w2, w1, [x0, 8] stp wzr, wzr, [x0, 16] stp wzr, wzr, [x0, 24] ret Curiously, a similar code but writing elements a[0..3] and a[5..8] (missing out a[4]) is SLP'd, producing superior: test: ldr q0, [x1] movi v1.4s, 0 str q1, [x0, 20] str q0, [x0] ret And similarly for (equivalent to the first): void test (int*__restrict a, int*__restrict b) { for (int i = 0; i < 4; i++) a[i] = b[i]; for (int i = 4; i < 8; i++) a[i] = 0; } producing: test: movi v0.4s, 0 ldp x2, x3, [x1] stp x2, x3, [x0] str q0, [x0, 16] ret
prev parent reply other threads:[~2015-09-22 16:51 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-09-21 12:24 [Bug c/67668] New: " ka_bena at yahoo dot fr 2015-09-21 12:44 ` [Bug c/67668] " glisse at gcc dot gnu.org 2015-09-22 16:51 ` ka_bena at yahoo dot fr [this message]
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-67668-4-wuVT3foy8R@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: linkBe 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).