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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251142
91177308-0d34-0410-b5e6-
96231b3b80d8
return false;
OutY = cast<SCEVConstant>(ConstOp)->getValue()->getValue();
- return (FlagsPresent & ExpectedFlags) != 0;
+ return (FlagsPresent & ExpectedFlags) == ExpectedFlags;
};
APInt C;