[PATCH] D60632: [ConstantRange] Disallow NUW | NSW in makeGuaranteedNoWrapRegion()

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 12 12:59:37 PDT 2019


nikic created this revision.
nikic added reviewers: lebedev.ri, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

As motivated in D60598 <https://reviews.llvm.org/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 disjointed 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.

After this change, I'd land an NFC rename from makeGuaranteedNoWrapRegion() to makeExactNoWrapRegion().


Repository:
  rL LLVM

https://reviews.llvm.org/D60632

Files:
  llvm/include/llvm/IR/ConstantRange.h
  llvm/lib/IR/ConstantRange.cpp
  llvm/unittests/IR/ConstantRangeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60632.194939.patch
Type: text/x-patch
Size: 14194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190412/de016d3b/attachment.bin>


More information about the llvm-commits mailing list