[clang] [llvm] [Mips] Add r5900 (PlayStation 2 Emotion Engine) CPU support (PR #176666)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 27 01:03:13 PST 2026


================
@@ -278,6 +280,65 @@ static bool hasUnoccupiedSlot(const MachineInstr *MI) {
   return MI->hasDelaySlot() && !MI->isBundledWithSucc();
 }
 
+/// Check if a branch is a short backward loop that triggers the R5900 erratum.
+/// The erratum occurs when:
+/// - A loop has 6 or fewer instructions (including branch + delay slot)
----------------
yingopq wrote:

I have a question, if we add NOP and the total number is still less than 6. Will this error be triggered again?

https://github.com/llvm/llvm-project/pull/176666


More information about the cfe-commits mailing list