Skip to content

Commit

Permalink
[Mips] Fix a warning
Browse files Browse the repository at this point in the history
This patch fixes:

  llvm/lib/Target/Mips/MipsInstrInfo.cpp:71:52: warning: enumerated
  and non-enumerated type in conditional expression [-Wextra]
  • Loading branch information
kazutakahirata committed Oct 30, 2022
1 parent 9df90de commit d9751f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/lib/Target/Mips/MipsInstrInfo.cpp
Expand Up @@ -68,7 +68,8 @@ MachineInstrBuilder MipsInstrInfo::insertNop(MachineBasicBlock &MBB,
"insertNop does not support MIPS16e mode at this time");
const unsigned MMOpc =
Subtarget.hasMips32r6() ? Mips::SLL_MMR6 : Mips::SLL_MM;
const unsigned Opc = Subtarget.inMicroMipsMode() ? MMOpc : Mips::SLL;
const unsigned Opc =
Subtarget.inMicroMipsMode() ? MMOpc : (unsigned)Mips::SLL;
return BuildMI(MBB, MI, DL, get(Opc), Mips::ZERO)
.addReg(Mips::ZERO)
.addImm(0);
Expand Down

0 comments on commit d9751f4

Please sign in to comment.