[llvm-branch-commits] [llvm] release/22.x: MIPS: Fix unsigned compare with zero in MipsSEInstrInfo::copyPhysReg (#179866) (PR #179893)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Feb 5 01:23:38 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-mips
Author: None (llvmbot)
<details>
<summary>Changes</summary>
Backport 209ff8bf06dd12becd79c1ebb01612c021e19f6c
Requested by: @<!-- -->wzssyqa
---
Full diff: https://github.com/llvm/llvm-project/pull/179893.diff
1 Files Affected:
- (modified) llvm/lib/Target/Mips/MipsSEInstrInfo.cpp (+2-2)
``````````diff
diff --git a/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp b/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp
index 4a92b1ffc4cf9..90f2996e7f93e 100644
--- a/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp
+++ b/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp
@@ -242,7 +242,7 @@ void MipsSEInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
Opc = Mips::FMOV_D64;
unsigned DestRegOff = DestReg.id() - Mips::D0_64;
unsigned SrcRegOff = SrcReg.id() - Mips::F0;
- if (SrcRegOff == DestRegOff && SrcRegOff >= 0 && SrcRegOff <= 31)
+ if (SrcRegOff == DestRegOff && SrcRegOff <= 31)
return;
}
} else if (Opc == 0 && Mips::FGR32RegClass.contains(DestReg) &&
@@ -253,7 +253,7 @@ void MipsSEInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
Opc = Mips::FMOV_D32;
unsigned DestRegOff = DestReg.id() - Mips::F0;
unsigned SrcRegOff = SrcReg.id() - Mips::D0_64;
- if (SrcRegOff == DestRegOff && SrcRegOff >= 0 && SrcRegOff <= 31)
+ if (SrcRegOff == DestRegOff && SrcRegOff <= 31)
return;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/179893
More information about the llvm-branch-commits
mailing list