]> granicus.if.org Git - llvm/commit
[DAGCombiner] Don't allow addcarry if the carry producer is illegal.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 27 Mar 2019 08:41:46 +0000 (08:41 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Wed, 27 Mar 2019 08:41:46 +0000 (08:41 +0000)
commit6ae1aaade9d511b146f4ed7931e34ea993f69275
treed175df9ea0f6a699055d8f244892ed484f2492fc
parentadd25ee3712645a4584b14d031e4cb73531d634d
[DAGCombiner]  Don't allow addcarry if the carry producer is illegal.

getAsCarry() checks that the input argument is a carry-producing node before
allowing a transformation to addcarry. This patch adds a check to make sure
that the carry-producing node is legal. If it is not, it may not remain in a
form that is manageable by the target backend. The test case caused a
compilation failure during instruction selection for this reason on SystemZ.

Patch by Ulrich Weigand.

Review: Sanjay Patel
https://reviews.llvm.org/D59822

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357052 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/SystemZ/dag-combine-05.ll [new file with mode: 0644]