[llvm] r317431 - [CGP] Fix the bug found by asan.
Serguei Katkov via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 5 00:59:02 PDT 2017
Author: skatkov
Date: Sun Nov 5 00:59:02 2017
New Revision: 317431
URL: http://llvm.org/viewvc/llvm-project?rev=317431&view=rev
Log:
[CGP] Fix the bug found by asan.
Try to fix the asan failure introduced by r317429.
Modified:
llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=317431&r1=317430&r2=317431&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Sun Nov 5 00:59:02 2017
@@ -4278,8 +4278,8 @@ bool CodeGenPrepare::optimizeMemoryInst(
// 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();
More information about the llvm-commits
mailing list