[PATCH] D29124: [ARM] GlobalISel: Fix stack-use-after-scope bug.
Martin Böhme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 06:37:03 PST 2017
mboehme created this revision.
Herald added subscribers: kristof.beyls, dberris, rengolin, aemerson.
Lifetime extension wasn't triggered on the result of BuildMI because the
reference was non-const. However, instead of adding a const, I've
removed the reference entirely as RVO should kick in anyway.
https://reviews.llvm.org/D29124
Files:
lib/Target/ARM/ARMInstructionSelector.cpp
Index: lib/Target/ARM/ARMInstructionSelector.cpp
===================================================================
--- lib/Target/ARM/ARMInstructionSelector.cpp
+++ lib/Target/ARM/ARMInstructionSelector.cpp
@@ -132,7 +132,7 @@
I.getOperand(0).setReg(AndResult);
auto InsertBefore = std::next(I.getIterator());
- auto &SubI =
+ auto SubI =
BuildMI(MBB, InsertBefore, I.getDebugLoc(), TII.get(ARM::RSBri))
.addDef(SExtResult)
.addUse(AndResult)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29124.85745.patch
Type: text/x-patch
Size: 526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170125/14ddbb14/attachment.bin>
More information about the llvm-commits
mailing list