<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Chandler,<div class=""><br class=""></div><div class="">I found a problem exposed by this commit: when CSE runs right after the loop vectorizer, it perform incorrect transformation which cause verifier to fail later. The reason for that is seemingly that after the vectorizer some analysis (DomTree?) isn’t invalidated, while it should be. This happens on several benchmarks from spec2006 when compiled with PGO/LTO. A simple workaround is to invoke simplify-cfg before early-cse, but that’s just papering over the issue.</div><div class=""><br class=""></div><div class="">What is a proper way for killing/updating dom-tree (I suspect it’s the rootcause) info after some pass?</div><div class=""><br class=""></div><div class="">Here is a small reduced test-case to reproduce the problem:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class="">$ opt  -loop-vectorize -instcombine -early-cse  -S reduced.ll</font></div><div class=""><font face="Menlo" class="">Instruction does not dominate all uses!</font></div><div class=""><font face="Menlo" class="">  %18 = xor i64 %umax, -1</font></div><div class=""><font face="Menlo" class="">  %scevgep45 = getelementptr i8* %d.020, i64 %18</font></div><div class=""><font face="Menlo" class="">LLVM ERROR: Broken function found, compilation aborted!</font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""></div></body></html>