[llvm] r352130 - RegBankSelect: Fix use after free in r352123
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 24 15:42:01 PST 2019
Author: arsenm
Date: Thu Jan 24 15:42:01 2019
New Revision: 352130
URL: http://llvm.org/viewvc/llvm-project?rev=352130&view=rev
Log:
RegBankSelect: Fix use after free in r352123
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp?rev=352130&r1=352129&r2=352130&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp Thu Jan 24 15:42:01 2019
@@ -185,7 +185,7 @@ bool RegBankSelect::repairReg(
unsigned MergeOp = RegTy.isScalar() ?
TargetOpcode::G_MERGE_VALUES : TargetOpcode::G_BUILD_VECTOR;
- auto &MergeBuilder =
+ auto MergeBuilder =
MIRBuilder.buildInstrNoInsert(MergeOp)
.addDef(MO.getReg());
More information about the llvm-commits
mailing list