[llvm] r214672 - X86: silence warning (-Wparentheses)

David Blaikie dblaikie at gmail.com
Mon Aug 4 09:40:37 PDT 2014


Another Clang missing case? (I doubt it - perhaps the original
committer wasn't using a recent clang or GCC?)

On Sun, Aug 3, 2014 at 4:00 PM, Saleem Abdulrasool
<compnerd at compnerd.org> wrote:
> Author: compnerd
> Date: Sun Aug  3 18:00:39 2014
> New Revision: 214672
>
> URL: http://llvm.org/viewvc/llvm-project?rev=214672&view=rev
> Log:
> X86: silence warning (-Wparentheses)
>
> GCC 4.8.2 points out the ambiguity in evaluation of the assertion condition:
>
> lib/Target/X86/X86FloatingPoint.cpp:949:49: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
>    assert(STReturns == 0 || isMask_32(STReturns) && N <= 2);
>
> Modified:
>     llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=214672&r1=214671&r2=214672&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Sun Aug  3 18:00:39 2014
> @@ -946,7 +946,7 @@ void FPS::handleCall(MachineBasicBlock::
>
>    // FP registers used for function return must be consecutive starting at
>    // FP0.
> -  assert(STReturns == 0 || isMask_32(STReturns) && N <= 2);
> +  assert((STReturns == 0 || isMask_32(STReturns)) && N <= 2);
>
>    for (unsigned I = 0; I < N; ++I)
>      pushReg(N - I - 1);
>
>
> _______________________________________________
> 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