[SystemZ] Fix bootstrap failure due to invalid DAG loop
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 22 Jan 2018 15:41:49 +0000 (15:41 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 22 Jan 2018 15:41:49 +0000 (15:41 +0000)
commit145d63f1ada934f82af0c0796d3ba21461270e47
treec96104aacb2d9b83f33b161b0cee2bab0bb95fcf
parent811523cc08b5b17768ff9427691dfb70a068dbbf
[SystemZ] Fix bootstrap failure due to invalid DAG loop

The change in r322988 caused a failure in the bootstrap build bot.
The problem was that directly gluing a BR_CCMASK node to a
compare-and-swap could lead to issues if other nodes were
chained in between.  There is then no way to create a topological
sort that respects both the chain sequence and the glue property.

Fixed for now by rejecting the optimization in this case.  As a
future enhancement, we may be able to handle additional cases
by swapping chain links around.

llvm-svn: 323129
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp