projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cde03f3
)
[CGP] Fix the bug found by asan.
author
Serguei Katkov
<serguei.katkov@azul.com>
Sun, 5 Nov 2017 07:59:02 +0000
(07:59 +0000)
committer
Serguei Katkov
<serguei.katkov@azul.com>
Sun, 5 Nov 2017 07:59:02 +0000
(07:59 +0000)
Try to fix the asan failure introduced by r317429.
llvm-svn: 317431
llvm/lib/CodeGen/CodeGenPrepare.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/CodeGenPrepare.cpp
b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index
0c0bc4d
..
2a67829
100644
(file)
--- 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();