diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-25 14:11:55 +0000 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-05-25 14:11:55 +0000 |
commit | 8b1fa076397555968ffa7dcda5ef91715cec5c8e (patch) | |
tree | e47a0712f9f3236a67296564789c2a5b3deda5ee /llvm/lib/IR/ConstantRange.cpp | |
parent | 214981185478329ee6745cbfdd35783e7320e73c (diff) | |
download | llvm-8b1fa076397555968ffa7dcda5ef91715cec5c8e.zip llvm-8b1fa076397555968ffa7dcda5ef91715cec5c8e.tar.gz llvm-8b1fa076397555968ffa7dcda5ef91715cec5c8e.tar.bz2 |
[CVP] Remove unnecessary checks for empty GNWR; NFC
The guaranteed no-wrap region is never empty, it always contains at
least zero, so these optimizations don't ever apply.
To make this more obviously true, replace the conversative return
in makeGNWR with an assertion.
llvm-svn: 361698
Diffstat (limited to 'llvm/lib/IR/ConstantRange.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index 5498862..0d44c38 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -238,8 +238,7 @@ ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp, switch (BinOp) { default: - // Conservative answer: empty set - return getEmpty(BitWidth); + llvm_unreachable("Unsupported binary op"); case Instruction::Add: { if (Unsigned) |