[SCEV] Adding a check on outgoing branches of a terminator instr for SCEVBackedgeCond...
authorJatin Bhateja <jatin.bhateja@gmail.com>
Sun, 26 Nov 2017 15:08:41 +0000 (15:08 +0000)
committerJatin Bhateja <jatin.bhateja@gmail.com>
Sun, 26 Nov 2017 15:08:41 +0000 (15:08 +0000)
commit7410eead0c4b6c33bc18b0505ad9cbc56edb20ef
treec096a79f5421f26d077d3f9adc09d587e812af7c
parentfa582b075c4762829eea59444624c9d90e6b1113
[SCEV] Adding a check on outgoing branches of a terminator instr for SCEVBackedgeConditionFolder, NFC.

Summary:
For a given loop, getLoopLatch returns a non-null value
when a loop has only one latch block. In the modified
context adding an assertion to check that both the outgoing branches of
a terminator instruction (of latch) does not target same header.
+
few minor code reorganization.

Reviewers: jbhateja

Reviewed By: jbhateja

Subscribers: sanjoy

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

llvm-svn: 318997
llvm/lib/Analysis/ScalarEvolution.cpp