[DAGCombine] (addcarry 0, 0, X) -> (ext/trunc X)
authorAmaury Sechet <deadalnix@gmail.com>
Fri, 19 May 2017 18:20:44 +0000 (18:20 +0000)
committerAmaury Sechet <deadalnix@gmail.com>
Fri, 19 May 2017 18:20:44 +0000 (18:20 +0000)
commit77cfb4a85f09a8330e5901b37e36b5e3ca597f9d
treefe28eeba0f71730383a29a386ea6d5c122530f2c
parent090871f2061b5760e36133cae9687cc6526b927f
[DAGCombine] (addcarry 0, 0, X) -> (ext/trunc X)

Summary:
While this makes some case better and some case worse - so it's unclear if it is a worthy combine just by itself - this is a useful canonicalisation.

As per discussion in D32756 .

Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

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

llvm-svn: 303441
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/addcarry.ll
llvm/test/CodeGen/X86/mul-i1024.ll
llvm/test/CodeGen/X86/mul-i256.ll
llvm/test/CodeGen/X86/mul-i512.ll
llvm/test/CodeGen/X86/overflow.ll