public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65773] New: [5.1 regression] GCC 5.1 miscompiles LLVM function AArch64InstrInfo::loadRegFromStackSlot() Date: Wed, 15 Apr 2015 15:28:00 -0000 [thread overview] Message-ID: <bug-65773-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65773 Bug ID: 65773 Summary: [5.1 regression] GCC 5.1 miscompiles LLVM function AArch64InstrInfo::loadRegFromStackSlot() Product: gcc Version: 5.1.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: wschmidt at gcc dot gnu.org CC: bergner at gcc dot gnu.org, jakub at gcc dot gnu.org, rguenth at gcc dot gnu.org Host: powerpc64*-linux-gnu Target: powerpc64*-linux-gnu Build: powerpc64*-linux-gnu I built gcc from branches/gcc-5-branch yesterday and used it to build Clang/LLVM as an acid test. Unfortunately the test suite shows a number of failures. I've traced these down to a miscompile of AArch64InstrInfo::loadRegFromStackSlot( <long argument list omitted> ). The bad code can be seen here: 105eb74c: 00 00 60 38 li r3,0 105eb750: 28 00 41 f9 std r10,40(r1) 105eb754: e4 06 29 79 rldicr r9,r9,0,59 105eb758: 30 00 41 f9 std r10,48(r1) 105eb75c: 21 00 01 99 stb r8,33(r1) 105eb760: 22 00 21 99 stb r9,34(r1) 105eb764: a5 ec 79 48 bl 10d8a408 <_ZN4llvm12MachineInstr10addOp\ erandERNS_15MachineFunctionERKNS_14MachineOperandE+0x8> This calls MachineInstr::addOperand(MachineFunction&, MachineOperand const&) with r3 as the this pointer. Loading zero into the this pointer ahead of the call seems somewhat unhelpful. The same code compiled with the 4.8 gcc I usually use shows: 106a8fa0: 78 cb 25 7f mr r5,r25 106a8fa4: 78 f3 c3 7f mr r3,r30 106a8fa8: 20 00 9e eb ld r28,32(r30) 106a8fac: 78 eb a4 7f mr r4,r29 106a8fb0: 78 d3 46 7f mr r6,r26 106a8fb4: 65 d4 7c 48 bl 10e76418 <_ZNK4llvm12MachineInstr21getR\ egClassConstraintEjPKNS_15TargetInstrInfoEPKNS_18TargetRegisterInfoE+0x8> which is clearly much more reasonable. I'll gather reproduction materials, but wanted to get the bug filed quickly for awareness.
next reply other threads:[~2015-04-15 15:28 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-15 15:28 wschmidt at gcc dot gnu.org [this message] 2015-04-15 15:33 ` [Bug target/65773] [5 Regression] " jakub at gcc dot gnu.org 2015-04-15 15:38 ` wschmidt at gcc dot gnu.org 2015-04-15 15:43 ` wschmidt at gcc dot gnu.org 2015-04-15 16:58 ` wschmidt at gcc dot gnu.org 2015-04-16 1:55 ` hubicka at gcc dot gnu.org 2015-04-16 2:35 ` [Bug tree-optimization/65773] " wschmidt at gcc dot gnu.org 2015-04-16 2:37 ` wschmidt at gcc dot gnu.org 2015-04-16 5:02 ` trippels at gcc dot gnu.org 2015-04-16 7:47 ` rguenth at gcc dot gnu.org 2015-04-16 8:18 ` hubicka at gcc dot gnu.org 2015-04-16 10:13 ` jakub at gcc dot gnu.org 2015-04-16 10:30 ` jakub at gcc dot gnu.org 2015-04-16 10:56 ` pinskia at gcc dot gnu.org 2015-04-16 11:15 ` james.molloy at arm dot com 2015-04-16 11:42 ` james.molloy at arm dot com
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-65773-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).