mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Remove the "isSigned" parameters from ConstantRange. It turns out they
are not needed as the results are the same with or without it. Patch by Nicholas Lewycky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34782 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1156,8 +1156,7 @@ Relation::KnownResult CEE::getCmpResult(CmpInst *CI,
|
||||
// Check to see if we already know the result of this comparison...
|
||||
ICmpInst::Predicate ipred = ICmpInst::Predicate(predicate);
|
||||
ConstantRange R = ICmpInst::makeConstantRange(ipred, C->getValue());
|
||||
ConstantRange Int = R.intersectWith(Op0VI->getBounds(),
|
||||
ICmpInst::isSignedPredicate(ipred));
|
||||
ConstantRange Int = R.intersectWith(Op0VI->getBounds());
|
||||
|
||||
// If the intersection of the two ranges is empty, then the condition
|
||||
// could never be true!
|
||||
@@ -1203,8 +1202,8 @@ bool Relation::contradicts(unsigned Op,
|
||||
if (Op >= ICmpInst::FIRST_ICMP_PREDICATE &&
|
||||
Op <= ICmpInst::LAST_ICMP_PREDICATE) {
|
||||
ICmpInst::Predicate ipred = ICmpInst::Predicate(Op);
|
||||
if (ICmpInst::makeConstantRange(ipred, C->getValue()).intersectWith(
|
||||
VI.getBounds(), ICmpInst::isSignedPredicate(ipred)).isEmptySet())
|
||||
if (ICmpInst::makeConstantRange(ipred, C->getValue())
|
||||
.intersectWith(VI.getBounds()).isEmptySet())
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1264,8 +1263,8 @@ bool Relation::incorporate(unsigned Op, ValueInfo &VI) {
|
||||
Op <= ICmpInst::LAST_ICMP_PREDICATE) {
|
||||
ICmpInst::Predicate ipred = ICmpInst::Predicate(Op);
|
||||
VI.getBounds() =
|
||||
ICmpInst::makeConstantRange(ipred, C->getValue()).intersectWith(
|
||||
VI.getBounds(), ICmpInst::isSignedPredicate(ipred));
|
||||
ICmpInst::makeConstantRange(ipred, C->getValue())
|
||||
.intersectWith(VI.getBounds());
|
||||
}
|
||||
|
||||
switch (Rel) {
|
||||
|
||||
Reference in New Issue
Block a user