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

Saleem Abdulrasool compnerd at compnerd.org
Sun Aug 3 16:00:40 PDT 2014


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);





More information about the llvm-commits mailing list