mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
Fix memory corruption I introduced a few checkins ago.
Self-review easily caught this obvious bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141880 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9d3c1cfbe
commit
7f1653a7ae
@ -202,12 +202,13 @@ TransformSubExpr(const SCEV *S, Instruction *User, Value *OperandValToReplace) {
|
||||
if (isa<SCEVConstant>(S) || isa<SCEVUnknown>(S))
|
||||
return S;
|
||||
|
||||
const SCEV *&ExprRef = Transformed[S];
|
||||
if (ExprRef)
|
||||
return ExprRef;
|
||||
const SCEV *Result = Transformed.lookup(S);
|
||||
if (Result)
|
||||
return Result;
|
||||
|
||||
ExprRef = TransformImpl(S, User, OperandValToReplace);
|
||||
return ExprRef;
|
||||
Result = TransformImpl(S, User, OperandValToReplace);
|
||||
Transformed[S] = Result;
|
||||
return Result;
|
||||
}
|
||||
|
||||
/// Top level driver for transforming an expression DAG into its requested
|
||||
|
Loading…
Reference in New Issue
Block a user