[SystemZ] Fix addcarry of addcarry of const carry (PR42606)
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 12 Jul 2019 20:03:34 +0000 (20:03 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 12 Jul 2019 20:03:34 +0000 (20:03 +0000)
commit411fa4c0dfe11b262564560066f3db1440f78b34
tree877e6b6c8d0d0acba3211960ccdf2fea0ce72837
parentf561227d133224d2d6a5a016abe4be051fa75501
[SystemZ] Fix addcarry of addcarry of const carry (PR42606)

This fixes https://bugs.llvm.org/show_bug.cgi?id=42606 by extending
D64213. Instead of only checking if the carry comes from a matching
operation, we now check the full chain of carries. Otherwise we might
custom lower the outermost addcarry, but then generically legalize
an inner addcarry.

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

llvm-svn: 365949
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/test/CodeGen/SystemZ/pr42606.ll [new file with mode: 0644]