diff --git a/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp b/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp index c3a43ad9e322..f31cc3defb47 100644 --- a/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp +++ b/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp @@ -217,7 +217,7 @@ bool MipsSEInstrInfo::isCopyInstr(const MachineInstr &MI, MachineOperand &Src, // 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);