[llvm] r188941 - No functionality change.

Bill Wendling wendling at apple.com
Wed Aug 21 17:19:01 PDT 2013


On Aug 21, 2013, at 3:11 PM, Yunzhong Gao <Yunzhong_Gao at playstation.sony.com> wrote:

> Author: ygao
> Date: Wed Aug 21 17:11:15 2013
> New Revision: 188941
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=188941&view=rev
> Log:
> No functionality change.
> Replace "(255 & value)" with "(0xFF & value)" to improve clarity.
> 

Thank you! :-)

-bw

> 
> Modified:
>    llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
> 
> Modified: llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp?rev=188941&r1=188940&r2=188941&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp Wed Aug 21 17:11:15 2013
> @@ -477,7 +477,7 @@ struct StrChrOpt : public LibCallOptimiz
> 
>     // 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 LibCallOptimi
>     }
> 
>     // 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());
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list