[llvm] r263525 - Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 19:33:31 PDT 2016


On Mon, Mar 14, 2016 at 7:19 PM, Eric Christopher via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: echristo
> Date: Mon Mar 14 21:19:06 2016
> New Revision: 263525
>
> URL: http://llvm.org/viewvc/llvm-project?rev=263525&view=rev
> Log:
> Fix llvm/llvm/lib/Transforms/Utils/LoopUnroll.cpp:285:53: error: suggest
> parentheses around '&&' within '||' [-Werror=parentheses].
>
> Modified:
>     llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
>
> Modified: llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=263525&r1=263524&r2=263525&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp Mon Mar 14 21:19:06 2016
> @@ -275,17 +275,15 @@ bool llvm::UnrollLoop(Loop *L, unsigned
>
>    // Loops containing convergent instructions must have a count that
> divides
>    // their TripMultiple.
> -  DEBUG(
> -    bool HasConvergent = false;
> -    for (auto &BB : L->blocks())
> -      for (auto &I : *BB)
> -        if (auto CS = CallSite(&I))
> -          HasConvergent |= CS.isConvergent();
> -    assert(
> -        !HasConvergent || TripMultiple % Count == 0 &&
> -        "Unroll count must divide trip multiple if loop contains a
> convergent "
> -        "operation.");
> -  );
> +  DEBUG(bool HasConvergent = false;
> +        for (auto &BB
> +             : L->blocks()) for (auto &I
> +                                 : *BB) if (auto CS = CallSite(&I))
>

That's ^ some weird indentation.


> +            HasConvergent |= CS.isConvergent();
> +        assert((!HasConvergent || TripMultiple % Count == 0) &&
> +               "Unroll count must divide trip multiple if loop contains a
> "
> +               "convergent "
> +               "operation."););
>    // Don't output the runtime loop prolog if Count is a multiple of
>    // TripMultiple.  Such a prolog is never needed, and is unsafe if the
> loop
>    // contains a convergent instruction.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://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/20160314/e0528e1d/attachment.html>


More information about the llvm-commits mailing list