[DAGCombine] optimizeSetCCOfSignedTruncationCheck(): handle inverted pattern
authorRoman Lebedev <lebedev.ri@gmail.com>
Sun, 2 Sep 2018 13:56:22 +0000 (13:56 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 2 Sep 2018 13:56:22 +0000 (13:56 +0000)
commitd7a62444754e095377f84731658b9d8a5ecae471
tree73c86803a9ccaf98862305e1e5b1e409e813467c
parentfb58ea1b803bf174a46f0de13a29cc7b99ad5f55
[DAGCombine] optimizeSetCCOfSignedTruncationCheck(): handle inverted pattern

Summary:
A follow-up for D49266 / rL337166 + D49497 / rL338044.

This is still the same pattern to check for the [lack of]
signed truncation, but in this case the constants and the predicate
are negated.

https://rise4fun.com/Alive/BDV
https://rise4fun.com/Alive/n7Z

Reviewers: spatel, craig.topper, RKSimon, javed.absar, efriedma, dmgreen

Reviewed By: spatel

Subscribers: llvm-commits

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

llvm-svn: 341287
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/lack-of-signed-truncation-check.ll
llvm/test/CodeGen/AArch64/signed-truncation-check.ll
llvm/test/CodeGen/X86/lack-of-signed-truncation-check.ll
llvm/test/CodeGen/X86/signed-truncation-check.ll