Skip to content

Commit

Permalink
[SystemZ] Silence compiler warning (llvm#113894)
Browse files Browse the repository at this point in the history
Use SystemZ::NoRegister instead of 0 in
SystemZTargetLowering::getRegisterByName().
  • Loading branch information
JonPsson1 authored Oct 28, 2024
1 parent f5d8a48 commit 09160a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,9 +1400,11 @@ SystemZTargetLowering::getRegisterByName(const char *RegName, LLT VT,
const MachineFunction &MF) const {
Register Reg =
StringSwitch<Register>(RegName)
.Case("r4", Subtarget.isTargetXPLINK64() ? SystemZ::R4D : 0)
.Case("r15", Subtarget.isTargetELF() ? SystemZ::R15D : 0)
.Default(0);
.Case("r4", Subtarget.isTargetXPLINK64() ? SystemZ::R4D
: SystemZ::NoRegister)
.Case("r15",
Subtarget.isTargetELF() ? SystemZ::R15D : SystemZ::NoRegister)
.Default(SystemZ::NoRegister);

if (Reg)
return Reg;
Expand Down

0 comments on commit 09160a9

Please sign in to comment.