summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>2013-08-21 22:11:15 +0000
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>2013-08-21 22:11:15 +0000
commit05efa23294b183c29dde213eedbce5640a5822de (patch)
tree770b14fc783ad51df06bb12a730285683d54f4e8 /llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
parent925b0e53f38c7e2c3362e50af610296e89668cbc (diff)
downloadbcm5719-llvm-05efa23294b183c29dde213eedbce5640a5822de.tar.gz
bcm5719-llvm-05efa23294b183c29dde213eedbce5640a5822de.zip
No functionality change.
Replace "(255 & value)" with "(0xFF & value)" to improve clarity. llvm-svn: 188941
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index ff0d5d9e8dd..83636fbb5ac 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -477,7 +477,7 @@ struct StrChrOpt : public LibCallOptimization {
// Compute the offset, make sure to handle the case when we're searching for
// zero (a weird way to spell strlen).
- size_t I = (255 & CharC->getSExtValue()) == 0 ?
+ size_t I = (0xFF & CharC->getSExtValue()) == 0 ?
Str.size() : Str.find(CharC->getSExtValue());
if (I == StringRef::npos) // Didn't find the char. strchr returns null.
return Constant::getNullValue(CI->getType());
@@ -513,7 +513,7 @@ struct StrRChrOpt : public LibCallOptimization {
}
// Compute the offset.
- size_t I = (255 & CharC->getSExtValue()) == 0 ?
+ size_t I = (0xFF & CharC->getSExtValue()) == 0 ?
Str.size() : Str.rfind(CharC->getSExtValue());
if (I == StringRef::npos) // Didn't find the char. Return null.
return Constant::getNullValue(CI->getType());
OpenPOWER on IntegriCloud