GVN-hoist: fix early exit logic
authorSebastian Pop <sebpop@gmail.com>
Thu, 4 Aug 2016 23:49:05 +0000 (23:49 +0000)
committerSebastian Pop <sebpop@gmail.com>
Thu, 4 Aug 2016 23:49:05 +0000 (23:49 +0000)
commit429740a6c257fd395d99d46ba4598e18c4839d2a
treeb144ca13f90eaafee3280690915c5a4c65024a7b
parent19dd0da153304f7947220141efd517f86406c9b3
GVN-hoist: fix early exit logic

The patch splits a complex && if condition into easier to read and understand
logic.  That wrong early exit condition was letting some instructions with not
all operands available pass through when HoistingGeps was true.

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

llvm-svn: 277785
llvm/lib/Transforms/Scalar/GVNHoist.cpp
llvm/test/Transforms/GVN/hoist-call.ll [new file with mode: 0644]
llvm/test/Transforms/GVN/hoist-recursive-geps.ll
llvm/test/Transforms/GVN/hoist.ll