HomePhabricator

[DAGcombine] Teach the combiner about -a = ~a + 1

Description

[DAGcombine] Teach the combiner about -a = ~a + 1

Summary: This include variant for add, uaddo and addcarry. usubo and subcarry require the carry to be flipped to preserve semantic, but we chose to do the transform anyway in that case as to push the transform down the carry chain.

Reviewers: efriedma, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

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

Details

Committed
deadalnixJun 4 2018, 12:23 PM
Differential Revision
D46505: [DAGcombine] Teach the combiner about -a = ~a + 1
Parents
rL333942: Fix for llvm-dis/llvm-bcanalyzer overflows
Branches
Unknown
Tags
Unknown