Skip to content

Commit

Permalink
[CGP] Fix the bug found by asan.
Browse files Browse the repository at this point in the history
Try to fix the asan failure introduced by r317429.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317431 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Serguei Katkov committed Nov 5, 2017
1 parent 6479e73 commit d346941
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/CodeGen/CodeGenPrepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4278,8 +4278,8 @@ bool CodeGenPrepare::optimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
// the graph are compatible.
bool PhiOrSelectSeen = false;
SmallVector<Instruction*, 16> AddrModeInsts;
AddressingModeCombiner AddrModes({ *DL, TLInfo },
{ Addr, MemoryInst->getParent() });
const SimplifyQuery SQ(*DL, TLInfo);
AddressingModeCombiner AddrModes(SQ, { Addr, MemoryInst->getParent() });
TypePromotionTransaction TPT(RemovedInsts);
TypePromotionTransaction::ConstRestorationPt LastKnownGood =
TPT.getRestorationPoint();
Expand Down

0 comments on commit d346941

Please sign in to comment.