public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/65773] [5 Regression] GCC 5.1 miscompiles LLVM function AArch64InstrInfo::loadRegFromStackSlot() Date: Thu, 16 Apr 2015 10:30:00 -0000 [thread overview] Message-ID: <bug-65773-4-hymXfHZdOa@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65773-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65773 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, the source in question is: const MachineInstrBuilder &MI = BuildMI(MBB, MBBI, DL, get(Opc)) .addReg(DestReg, getDefRegState(true)) .addFrameIndex(FI); if (Offset) MI.addImm(0); MI.addMemOperand(MMO); which in *.gimple dump looks like: try { D.382398 = &this->D.207751.D.207513.D.205713; D.382399 = llvm::MCInstrInfo::get (D.382398, Opc); D.325474 = llvm::BuildMI (MBB, MBBI, &D.325473, D.382399); [return slot optimization] try { D.382400 = llvm::getDefRegState (1); D.382401 = llvm::MachineInstrBuilder::addReg (&D.325474, DestReg, D.382400, 0); MI = llvm::MachineInstrBuilder::addFrameIndex (D.382401, FI); } finally { D.325474 = {CLOBBER}; } } finally { llvm::DebugLoc::~DebugLoc (&D.325473); D.325473 = {CLOBBER}; } if (Offset != 0) goto <D.382402>; else goto <D.382403>; <D.382402>: llvm::MachineInstrBuilder::addImm (MI, 0); goto <D.382404>; <D.382403>: <D.382404>: llvm::MachineInstrBuilder::addMemOperand (MI, MMO); which suggests that the temporary that BuildMI returns goes out of scope at the end of the const MachineInstrBuilder &MI = BuildMI(MBB, MBBI, DL, get(Opc)) .addReg(DestReg, getDefRegState(true)) .addFrameIndex(FI); and sets the reference to the out of scope temporary. const MachineInstrBuilder &addReg(unsigned RegNo, unsigned flags = 0, unsigned SubReg = 0) const { ends with return *this; and const MachineInstrBuilder &addFrameIndex(int Idx) const { MI->addOperand(*MF, MachineOperand::CreateFI(Idx)); return *this; } too.
next prev parent reply other threads:[~2015-04-16 10:30 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-15 15:28 [Bug target/65773] New: [5.1 regression] " wschmidt at gcc dot gnu.org 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 [this message] 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-hymXfHZdOa@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).