[llvm] 15f2d4f - [AIX] Fixed "comparison of unsigned expression >= 0 is always true" gcc warnings.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 17:36:34 PST 2020


Any idea if this is the most suitable fix? Is "Bits" representing negative
values? If not, perhaps it'd be more appropriate to remove the >= 0
comparison, rather than to change the type?

On Mon, Dec 14, 2020 at 8:09 AM via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: diggerlin
> Date: 2020-12-14T11:08:40-05:00
> New Revision: 15f2d4f198380762e9fcf6b456d405078b87ae7a
>
> URL:
> https://github.com/llvm/llvm-project/commit/15f2d4f198380762e9fcf6b456d405078b87ae7a
> DIFF:
> https://github.com/llvm/llvm-project/commit/15f2d4f198380762e9fcf6b456d405078b87ae7a.diff
>
> LOG: [AIX] Fixed "comparison of unsigned expression >= 0 is always true"
> gcc warnings.
>
> Summary:
>
> fixed a  Fixed "comparison of unsigned expression >= 0 is always true" gcc
> warnings.
> http://lab.llvm.org:8011/#/builders/5/builds/2407/steps/2/logs/stdio
>
> the error caused by patch https://reviews.llvm.org/D92398
>
> Added:
>
>
> Modified:
>     llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
> b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
> index 02a425044c75..d364eb9d3996 100644
> --- a/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
> +++ b/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp
> @@ -67,7 +67,7 @@ bool PPCFunctionInfo::isLiveInZExt(Register VReg) const {
>
>  void PPCFunctionInfo::appendParameterType(ParamType Type) {
>    uint32_t CopyParamType = ParameterType;
> -  unsigned Bits = 0;
> +  int Bits = 0;
>
>    // If it is fixed type, we only need to increase the FixedParamNum, for
>    // the bit encode of fixed type is bit of zero, we do not need to
> change the
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201214/3ac01668/attachment.html>


More information about the llvm-commits mailing list