forked from OSchip/llvm-project
[SCEV] Fix stylistic issue in MatchBinaryAddToConst; NFCI
Instead of checking `(FlagsPresent & ExpectedFlags) != 0`, check `(FlagsPresent & ExpectedFlags) == ExpectedFlags`. Right now they're equivalent since `ExpectedFlags` can only be either `FlagNUW` or `FlagNSW`, but if we ever pass in `ExpectedFlags` as `FlagNUW | FlagNSW` then checking `(FlagsPresent & ExpectedFlags) != 0` would be wrong. llvm-svn: 251142
This commit is contained in:
parent
0a1bee8a80
commit
52f7b08b4a
|
@ -7191,7 +7191,7 @@ bool ScalarEvolution::isKnownPredicateViaNoOverflow(ICmpInst::Predicate Pred,
|
|||
return false;
|
||||
|
||||
OutY = cast<SCEVConstant>(ConstOp)->getValue()->getValue();
|
||||
return (FlagsPresent & ExpectedFlags) != 0;
|
||||
return (FlagsPresent & ExpectedFlags) == ExpectedFlags;
|
||||
};
|
||||
|
||||
APInt C;
|
||||
|
|
Loading…
Reference in New Issue