From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16818 invoked by alias); 29 Oct 2014 07:22:18 -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 16793 invoked by uid 48); 29 Oct 2014 07:22:13 -0000 From: "markos at freevec dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63673] New: VSX intrinsic vec_vsx_ld fails to compile with double, maps to wrong instructions with float Date: Wed, 29 Oct 2014 07:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markos at freevec dot org X-Bugzilla-Status: UNCONFIRMED 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 attachments.created Message-ID: 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-10/txt/msg02215.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63673 Bug ID: 63673 Summary: VSX intrinsic vec_vsx_ld fails to compile with double, maps to wrong instructions with float Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: markos at freevec dot org Created attachment 33836 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D33836&action=3Dedit failing to compile testcase for vec_vsx_ld using doubles These are actually two issues, but I'm filing a single bug report as it loo= ks like they are related. First the build error, I've created a small failing testcase (also attached= ): -- #include int main() { double __attribute__((aligned(16))) d[4] =3D {0.0, 1.0, 2.0, 3.0 }; vector double v =3D vec_vsx_ld(8, d); // should load {1.0, 2.0} } -- This fails to compile under Debian gcc (4.9.1-19), with the following error: $ gcc vec_vsx_ld_fail.c -c vec_vsx_ld_fail.c: In function =E2=80=98main=E2=80=99: vec_vsx_ld_fail.c:6:2: error: invalid parameter combination for AltiVec intrinsic vector double v =3D vec_vsx_ld(4, d); // should load {1.0, 2.0} Casting d to (float *) makes it compile, but vec_vsx_ld intrinsic definitely should handle double parameters, so I think this is a bug. Now the second problem, a similar testcase for float (also attached): -- #include int main() { float __attribute__((aligned(16))) f[8] =3D {0.0, 1.0, 2.0, 3.0, 4.= 0, 5.0, 6.0, 7.0 }; vector float v =3D vec_vsx_ld(4, f); // should load {1.0, 2.0, 3.0,= 4.0} } -- This does compile, but the asm output uses the lxvd2x asm instruction, when according the the ISA, lxvw4x should be used -at least according to my understanding (page 359, Power ISA 2.07). Asm output also attached. >>From gcc-bugs-return-465193-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Oct 29 03:30:27 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29545 invoked by alias); 29 Oct 2014 03:30: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 29509 invoked by uid 48); 29 Oct 2014 03:30:21 -0000 From: "andi-gcc at firstfloor dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/63672] New: xbegin/xend/xabort missing memory barriers Date: Wed, 29 Oct 2014 07:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: andi-gcc at firstfloor dot org X-Bugzilla-Status: UNCONFIRMED 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 attachments.created Message-ID: 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-10/txt/msg02214.txt.bz2 Content-length: 745 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63672 Bug ID: 63672 Summary: xbegin/xend/xabort missing memory barriers Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Created attachment 33835 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33835&action=edit proposed patch adding barriers No test case currently, but we got a report that the builtins for x86 RTM xbegin/xend/xabort are missing implicit memory barriers. This can cause code to be moved outside the critical sections, breaking the program.