Do not legalize large add with addc/adde, introduce addcarry and do it with uaddo...
authorAmaury Sechet <deadalnix@gmail.com>
Sun, 30 Apr 2017 19:24:09 +0000 (19:24 +0000)
committerAmaury Sechet <deadalnix@gmail.com>
Sun, 30 Apr 2017 19:24:09 +0000 (19:24 +0000)
commit8ac81f392424142a2a92e231afda1f637ac59041
tree9896f9f4edd976167f9b9fe24d8d304abf17f14d
parent0c6086f493b0b5208d2e58ad5278322523440ddd
Do not legalize large add with addc/adde, introduce addcarry and do it with uaddo/addcarry

Summary: As per discution on how to get better codegen an large int legalization, it became clear that using a glue for the carry was preventing several desirable optimizations. Passing the carry down as a value allow for more flexibility.

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

Subscribers: igorb, llvm-commits

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

llvm-svn: 301775
llvm/include/llvm/CodeGen/ISDOpcodes.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
llvm/lib/CodeGen/TargetLoweringBase.cpp
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/known-bits.ll