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:
9b65ffb
)
[X86] In X86DAGToDAGISel::PreprocessISelDAG, make sure we don't access N after we...
author
Craig Topper
<craig.topper@intel.com>
Wed, 27 Jun 2018 20:58:46 +0000
(20:58 +0000)
committer
Craig Topper
<craig.topper@intel.com>
Wed, 27 Jun 2018 20:58:46 +0000
(20:58 +0000)
If we turn X86ISD::AND into ISD::AND, we delete N. But we were continuing onto the next block of code even though N no longer existed.
Just happened to notice it. I assume asan didn't notice it because we explicitly unpoison deleted nodes and give them a DELETE_NODE opcode.
llvm-svn: 335787
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index
754e74c
..
3382ee8
100644
(file)
--- a/
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@
-668,6
+668,7
@@
void X86DAGToDAGISel::PreprocessISelDAG() {
CurDAG->ReplaceAllUsesOfValueWith(SDValue(N, 0), Res);
++I;
CurDAG->DeleteNode(N);
+ continue;
}
if (OptLevel != CodeGenOpt::None &&