diff options
author | Serguei Katkov <serguei.katkov@azul.com> | 2017-11-05 07:59:02 +0000 |
---|---|---|
committer | Serguei Katkov <serguei.katkov@azul.com> | 2017-11-05 07:59:02 +0000 |
commit | aee6375b02888514b464992cb2bda4e90bdfb343 (patch) | |
tree | fabcd5d132e8bc6ec80130efb792e0c3c8070682 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | cde03f3d27a81b9d644588af40c888a87cbc4c4b (diff) | |
download | bcm5719-llvm-aee6375b02888514b464992cb2bda4e90bdfb343.tar.gz bcm5719-llvm-aee6375b02888514b464992cb2bda4e90bdfb343.zip |
[CGP] Fix the bug found by asan.
Try to fix the asan failure introduced by r317429.
llvm-svn: 317431
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 0c0bc4d13aa..2a678291c42 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -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(); |