mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-11 04:06:20 +00:00
[ARM] GlobalISel: Fix stack-use-after-scope bug.
Summary: 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. Reviewers: rovka, bkramer Reviewed By: bkramer Subscribers: aemerson, rengolin, dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D29124 llvm-svn: 293059
This commit is contained in:
parent
4df4c4a4aa
commit
8396e14e7f
@ -132,7 +132,7 @@ bool ARMInstructionSelector::select(MachineInstr &I) const {
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user