[DAGCombine] optimizeSetCCOfSignedTruncationCheck(): handle ule,ugt CondCodes.
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 26 Jul 2018 17:34:28 +0000 (17:34 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 26 Jul 2018 17:34:28 +0000 (17:34 +0000)
commit41ba5c1455386c87c4b20aa7a1342e80261b7f79
tree2b79275eae65eda6b8bcce8e87af4d42cd7b6174
parent223d921c6a17c037ba2d5276bc70e916df63827f
[DAGCombine] optimizeSetCCOfSignedTruncationCheck(): handle ule,ugt CondCodes.

Summary:
A follow-up for D49266 / rL337166.

At least one of these cases is more canonical,
so we really do have to handle it.
https://godbolt.org/g/pkzP3X
https://rise4fun.com/Alive/pQyhZZ

We won't get to these cases with I1 being -1,
as that will be constant-folded to true or false.

I'm also not sure we actually hit the 'ule' case,
but i think the worst think that could happen is that being dead code.

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

Reviewed By: spatel

Subscribers: llvm-commits

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

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