[llvm] r333097 - Silence warnings introduced with r333093

Petar Jovanovic via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 09:27:51 PDT 2018


Author: petarj
Date: Wed May 23 09:27:51 2018
New Revision: 333097

URL: http://llvm.org/viewvc/llvm-project?rev=333097&view=rev
Log:
Silence warnings introduced with r333093

r333093 introduced several warnings (-Wlogical-not-parentheses,
-Wbool-compare).
Adding parentheses in MipsSEInstrInfo::isCopyInstr() to silence it.

Modified:
    llvm/trunk/lib/Target/Mips/MipsSEInstrInfo.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsSEInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSEInstrInfo.cpp?rev=333097&r1=333096&r2=333097&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSEInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsSEInstrInfo.cpp Wed May 23 09:27:51 2018
@@ -217,7 +217,7 @@ bool MipsSEInstrInfo::isCopyInstr(const
   // Condition is made to match the creation of WRDSP/RDDSP copy instruction
   // from copyPhysReg function.
   if (isReadOrWritToDSPReg(MI, isDSPControlWrite)) {
-    if (!MI.getOperand(1).isImm() || !MI.getOperand(1).getImm() == (1<<4))
+    if (!MI.getOperand(1).isImm() || !(MI.getOperand(1).getImm() == (1<<4)))
       return false;
     else if (isDSPControlWrite) {
       Src = MI.getOperand(0);




More information about the llvm-commits mailing list