]> granicus.if.org Git - llvm/commit
[SelectionDAG] Fix bugs in inverted condition splitting code.
authorGeoff Berry <gberry@codeaurora.org>
Thu, 9 Feb 2017 18:28:17 +0000 (18:28 +0000)
committerGeoff Berry <gberry@codeaurora.org>
Thu, 9 Feb 2017 18:28:17 +0000 (18:28 +0000)
commite22db94a8f5d5ae6bbfecdd1a340924d7067a584
treeb0dc163c93dd5561501664dadc7b0170bbf5a4ce
parent606c50d3577bcb101c6d5d86c8032e17a7181bba
[SelectionDAG] Fix bugs in inverted condition splitting code.

Summary:
Fix two bugs in SelectionDAGBuilder::FindMergedConditions reported by
Mikael Holmen.  Handle non-canonicalized xor not operation
correctly (was assuming operand 0 was always the non-constant operand)
and check that the negated condition is also in the same block as the
original and/or instruction (as is done for and/or operands already)
before proceeding with optimization.

Reviewers: bogner, MatzeB, qcolombet

Subscribers: mcrosier, uabelho, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294605 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/AArch64/br-cond-not-merge.ll