]> granicus.if.org Git - llvm/commit
[NewGVN] Don't derive incorrect implications.
authorDavide Italiano <davide@freebsd.org>
Mon, 1 May 2017 22:26:28 +0000 (22:26 +0000)
committerDavide Italiano <davide@freebsd.org>
Mon, 1 May 2017 22:26:28 +0000 (22:26 +0000)
commitf1457bf082680acd3854db9106303c423c755fef
treee41070b31fd08ff5717ca1fde71ea8460c4474a1
parent5ef20bbe9cab9b64d43ced2ea90ac4f499dbe9ee
[NewGVN] Don't derive incorrect implications.

In the testcase attached,  we believe %tmp1 implies %tmp4.
where:
  br i1 %tmp1, label %bb2, label %bb7
  br i1 %tmp4, label %bb5, label %bb7

because Wwhile looking at PredicateInfo stuffs we end up calling
isImpliedTrueByMatchingCmp() with the arguments backwards.

Differential Revision:  https://reviews.llvm.org/D32718

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301849 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/NewGVN.cpp
test/Transforms/NewGVN/pr32852.ll [new file with mode: 0644]