OSDN Git Service

[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)
commit24c0aa9af62dab27aa856c5b3423878298ef49dd
tree9c70b8331e3fc5da18329fd53541540c5d852645
parent01c573fe17bd46441d98489847db1145a6789122
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338044 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/AArch64/lack-of-signed-truncation-check.ll
test/CodeGen/X86/lack-of-signed-truncation-check.ll