Resurrect r191017 " GVN proceeds in the presence of dead code" plus a fix to PR17307...
authorShuxin Yang <shuxin.llvm@gmail.com>
Fri, 20 Sep 2013 23:12:57 +0000 (23:12 +0000)
committerShuxin Yang <shuxin.llvm@gmail.com>
Fri, 20 Sep 2013 23:12:57 +0000 (23:12 +0000)
commitd93e8a06b2ca09ab18f390cd514b7443e2e571f7
tree6126b1cad8f4f9182c944c0d697bb264c0348136
parent4a20092e638935be11e87d33f7e5b35140162bd2
Resurrect r191017 " GVN proceeds in the presence of dead code" plus a fix to PR17307 & 17308.

  The problem of r191017 is that when GVN fabricate a val-number for a dead instruction (in order
to make following expr-PRE happy), it forget to fabricate a leader-table entry for it as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191118 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/2007-07-26-InterlockingLoops.ll
test/Transforms/GVN/2008-07-02-Unreachable.ll
test/Transforms/GVN/cond_br.ll [new file with mode: 0644]
test/Transforms/GVN/cond_br2.ll [new file with mode: 0644]
test/Transforms/GVN/local-pre.ll
test/Transforms/GVN/rle-nonlocal.ll
test/Transforms/GVN/rle-semidominated.ll
test/Transforms/GVN/rle.ll