]> granicus.if.org Git - llvm/commit
[ARM][CGP] Skip nuw in PrepareConstants
authorSam Parker <sam.parker@arm.com>
Tue, 21 May 2019 07:56:47 +0000 (07:56 +0000)
committerSam Parker <sam.parker@arm.com>
Tue, 21 May 2019 07:56:47 +0000 (07:56 +0000)
commit1bf013b0689a83873d2134dda61e84590f0bfb6d
tree2603f698d65e26776770be5803bbf90b41890348
parentc4aea6055d4213fbe114728571197f41f5f2ad11
[ARM][CGP] Skip nuw in PrepareConstants

PrepareConstants step converts add/sub with 'negative' immediates to
sub/add with a 'positive' imm to make promotion more simple. nuw
already states that the add shouldn't cause an unsigned wrap, so
it shouldn't need any tweaking. Plus, we also don't allow a sub with
a 'negative' immediate to be safe wrap, so this functionality has
been removed. The PrepareConstants step now just handles the add
instructions that we've determined would be safe if they wrap around
zero.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361227 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMCodeGenPrepare.cpp
test/CodeGen/ARM/CGP/arm-cgp-overflow.ll