OSDN Git Service

[ARM] Fix for PR39060
authorSam Parker <sam.parker@arm.com>
Wed, 26 Sep 2018 10:56:00 +0000 (10:56 +0000)
committerSam Parker <sam.parker@arm.com>
Wed, 26 Sep 2018 10:56:00 +0000 (10:56 +0000)
commit78e19a9d43e4ccd4003b942b4280ce4a4395e5f9
treeeed830e1973cd687297d4028e101a312b9c2d79d
parentae073c99a4639f281962d9656255bbb988538ca1
[ARM] Fix for PR39060

When calculating whether a value can safely overflow for use by an
icmp, we weren't checking that the value couldn't wrap around. To do
this we need the icmp to be using a constant, as well as the incoming
add or sub.

bugzilla report: https://bugs.llvm.org/show_bug.cgi?id=39060

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343092 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMCodeGenPrepare.cpp
test/CodeGen/ARM/arm-cgp-overflow.ll
test/CodeGen/ARM/arm-cgp-signed-icmps.ll
test/CodeGen/ARM/pr39060.ll [new file with mode: 0644]