]> granicus.if.org Git - llvm/commit
[ConstantRange] Disallow NUW | NSW in makeGuaranteedNoWrapRegion()
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 13 Apr 2019 19:43:45 +0000 (19:43 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 13 Apr 2019 19:43:45 +0000 (19:43 +0000)
commitd8edeb6f8927320a93aa24e62cc8410a241776a4
tree68d0e3e6eaa18dc9cabaae14cf073d9d1b274c63
parent360d0ef49804401c4bd97087a242d51124b7a911
[ConstantRange] Disallow NUW | NSW in makeGuaranteedNoWrapRegion()

As motivated in D60598, this drops support for specifying both NUW and
NSW in makeGuaranteedNoWrapRegion(). None of the users of this function
currently make use of this.

When both NUW and NSW are specified, the exact nowrap region has two
disjoint parts and makeGNWR() returns one of them. This result doesn't
seem to be useful for anything, but makes the semantics of the function
fuzzier.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358340 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/ConstantRange.h
lib/IR/ConstantRange.cpp
unittests/IR/ConstantRangeTest.cpp