OSDN Git Service

[SCEV] Fix stylistic issue in MatchBinaryAddToConst; NFCI
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 23 Oct 2015 20:09:57 +0000 (20:09 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 23 Oct 2015 20:09:57 +0000 (20:09 +0000)
commitcf0160bc3b361cabec58be5746431f64d35eb2e9
treeb42da8e664fc93767c9b697faac785aeb99eda0d
parent4935ac688915c934b3d2fcde29c25ae8f0ce7b95
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251142 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp