public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "acsawdey at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94622] New: testsuite/gcc.dg/atomic/c11-atomic-exec-1.c fails on powerpc64le with -mpcrel Date: Thu, 16 Apr 2020 15:48:10 +0000 [thread overview] Message-ID: <bug-94622-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94622 Bug ID: 94622 Summary: testsuite/gcc.dg/atomic/c11-atomic-exec-1.c fails on powerpc64le with -mpcrel Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acsawdey at gcc dot gnu.org Target Milestone: --- Compile command: /home2/sawdey/work/gcc/mamboCI/build-mambo/gcc/xgcc -B/home2/sawdey/work/gcc/mamboCI/build-mambo/gcc/ /home2/sawdey/work/gcc/mamboCI/pike-trunk/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-1.c -B/home2/sawdey/work/gcc/mamboCI/build-mambo/powerpc64le-unknown-linux-gnu/./libatomic/ -L/home2/sawdey/work/gcc/mamboCI/build-mambo/powerpc64le-unknown-linux-gnu/./libatomic/.libs -latomic -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -O1 -std=c11 -pedantic-errors -lm -mpcrel -mcpu=future -o c11-atomic-exec-1.exe Compiler is trunk from about a week ago. Reduced test case: extern void abort (void); extern void exit (int); static void test_simple_assign (void) { do { do { static volatile _Atomic (long double) b = (long double) ((1)); if (b != ((long double) ((1)))) abort (); } while (0); } while (0); } int main (void) { test_simple_assign (); exit (0); } The problem seems to be that with -mpcrel, we generate a plq for the load of the long double constant and are swapping around the doublewords, which is only needed for lq not plq. The generated code with -mpcrel: plq 8,.LANCHOR0@pcrel mr 10,9 mr 11,8 cmpw 0,10,10 bne- 0,$+4 isync std 9,32(1) std 8,40(1) plfd 0,.LC0@pcrel plfd 1,.LC0+8@pcrel lfd 12,32(1) lfd 13,40(1) fcmpu 0,12,0 bne 0,$+8 fcmpu 0,13,1 bne 0,.L4 And with -mno-pcrel: addis 9,2,.LANCHOR0@toc@ha addi 9,9,.LANCHOR0@toc@l lq 10,0(9) mr 8,10 mr 9,11 mr 10,11 mr 11,8 cmpw 0,10,10 bne- 0,$+4 isync std 9,32(1) std 8,40(1) addis 9,2,.LC0@toc@ha addi 9,9,.LC0@toc@l lfd 0,0(9) lfd 1,8(9) lfd 12,32(1) lfd 13,40(1) fcmpu 0,12,0 bne 0,$+8 fcmpu 0,13,1 bne 0,.L4
next reply other threads:[~2020-04-16 15:48 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-16 15:48 acsawdey at gcc dot gnu.org [this message] 2020-04-16 16:27 ` [Bug target/94622] " acsawdey at gcc dot gnu.org 2020-04-17 22:26 ` acsawdey at gcc dot gnu.org 2020-04-20 17:56 ` acsawdey at gcc dot gnu.org 2020-04-21 21:16 ` acsawdey at gcc dot gnu.org 2020-04-22 17:20 ` cvs-commit at gcc dot gnu.org 2020-04-22 21:47 ` acsawdey at gcc dot gnu.org
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-94622-4@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).