[InstCombine] Handle usubo always overflow
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 10 Apr 2019 07:10:53 +0000 (07:10 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 10 Apr 2019 07:10:53 +0000 (07:10 +0000)
commit09020ec2a7199fca2835e6dbbac9d89f9222a843
tree4f88088ed07b425ff6b33645a587a5d4efd6efd8
parent596cbeb7058b98518952612069e2bb0b13863ef8
[InstCombine] Handle usubo always overflow

Check AlwaysOverflow condition for usubo. The implementation is the
same as the existing handling for uaddo and umulo. Handling for saddo
and ssubo will follow (smulo doesn't have the necessary ValueTracking
support).

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

llvm-svn: 358052
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/with_overflow.ll