mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Make ConstantRange::makeICmpRegion handle all the edge cases properly. This
also fixes PR8250. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Support/ConstantRange.h"
|
||||
#include "llvm/Instructions.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -429,4 +430,11 @@ TEST_F(ConstantRangeTest, Lshr) {
|
||||
EXPECT_EQ(Wrap.lshr(Wrap), Full);
|
||||
}
|
||||
|
||||
TEST(ConstantRange, MakeICmpRegion) {
|
||||
// PR8250
|
||||
ConstantRange SMax = ConstantRange(APInt::getSignedMaxValue(32));
|
||||
EXPECT_TRUE(ConstantRange::makeICmpRegion(ICmpInst::ICMP_SGT,
|
||||
SMax).isEmptySet());
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
Reference in New Issue
Block a user