[DAGCombine][ARM] x ==/!= c -> (x - c) ==/!= 0 iff '-c' can be folded into the...
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 22 Oct 2019 19:51:10 +0000 (22:51 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 22 Oct 2019 19:56:35 +0000 (22:56 +0300)
commit4334892e7b077feac3124b789733dbec3380db4c
treebd615069255aa6ad1827b71face46a68c4691e62
parent9b1419a9e501389ec4b98553d9e00a8e327e43d0
[DAGCombine][ARM] x ==/!= c  ->  (x - c) ==/!= 0  iff '-c' can be folded into the x node.

Summary:
This fold, helps recover from the rest of the D62266 ARM regressions.
https://rise4fun.com/Alive/TvpC

Note that while the fold is quite flexible, i've restricted it
to the single interesting pattern at the moment.

Reviewers: efriedma, craig.topper, spatel, RKSimon, deadalnix

Reviewed By: deadalnix

Subscribers: javed.absar, kristof.beyls, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62450
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/ARM/addsubcarry-promotion.ll