diff --git a/pcsx2/arm64/recR5900_arm64.cpp b/pcsx2/arm64/recR5900_arm64.cpp
index 6976b8f..a72bcb0 100644
--- a/pcsx2/arm64/recR5900_arm64.cpp
+++ b/pcsx2/arm64/recR5900_arm64.cpp
@@ -273,6 +273,63 @@ namespace
 
 	// Guest pc of the op being emitted (compilation is EE-thread-only, like s_rc).
 	u32 s_emit_pc = 0;
+	u32 s_block_pc = 0; // guest pc of the block being compiled (idle-loop detection)
+
+	// A block that branches back to its own start and does the same thing on
+	// every pass: it only loads, computes from what it loaded or from
+	// constants, and writes no register it read first. Such a loop is waiting
+	// for an interrupt or a value another unit changes, so its iterations can
+	// be skipped up to the next event. The x86 recompiler's rule (s_nBlockFF in
+	// iR5900-32.cpp) word for word: start..end covers the block through the
+	// delay slot; the branch itself (end - 8) is not examined. Games poll a
+	// vsync flag this way; emulated pass by pass, the poll keeps a host core
+	// busy for the whole wait (Need for Speed Underground 2: a 30 fps game
+	// waiting out every other frame).
+	bool IsIdleLoopBody(u32 start, u32 end)
+	{
+		u32 reads = 0, loads = 1;
+		for (u32 i = start; i < end; i += 4)
+		{
+			if (i == end - 8)
+				continue;
+			const u32 code = memRead32(i);
+			const u32 opc = code >> 26, funct = code & 0x3f;
+			const u32 rs = (code >> 21) & 31, rt = (code >> 16) & 31, rd = (code >> 11) & 31;
+			if (code == 0)
+				continue;
+			if (opc == 057 || (opc == 0 && funct == 017)) // cache, sync
+				continue;
+			if ((opc & 070) == 010 || (opc & 076) == 030) // immediate arithmetic
+			{
+				if (loads & 1u << rs) { loads |= 1u << rt; continue; }
+				reads |= 1u << rs;
+				if (reads & 1u << rt) return false;
+			}
+			else if (opc == 0 && (funct <= 007 || (funct & 070) == 070)) // shifts
+			{
+				if (loads & 1u << rt) loads |= 1u << rd;
+				else reads |= 1u << rt;
+				if (reads & 1u << rd) return false;
+			}
+			else if (opc == 0 && (funct & 060) == 040 && (funct & 076) != 050) // register arithmetic
+			{
+				if ((loads & 1u << rs) && (loads & 1u << rt)) { loads |= 1u << rd; continue; }
+				reads |= 1u << rs | 1u << rt;
+				if (reads & 1u << rd) return false;
+			}
+			else if ((opc & 070) == 040 || (opc & 076) == 032 || opc == 067 || opc == 036) // loads, lq
+			{
+				if (!(loads & 1u << rs)) reads |= 1u << rs;
+				loads |= 1u << rt;
+				if (reads & 1u << rt) return false;
+			}
+			else if ((opc & 074) == 020 && rs < 4) // mfc*, cfc*
+				loads |= 1u << rt;
+			else
+				return false;
+		}
+		return true;
+	}
 
 	// Latched once: x28 holds the fastmem base in this mode, the vmap base
 	// otherwise, and every block's prologue must agree with every other block's
@@ -3873,7 +3930,8 @@ namespace {
 		// backwards, since the counters derive their counts from the distance
 		// between it and the cycle they last synced at.
 		const bool idle_skip = EmuConfig.Speedhacks.WaitLoop && !is_jr
-			&& ((tconst & 0x1fffffff) == 0x00081fc0);
+			&& (((tconst & 0x1fffffff) == 0x00081fc0)
+				|| (tconst == s_block_pc && IsIdleLoopBody(s_block_pc, bpc + 8)));
 		const auto EmitIdleSkip = [&m]()
 		{
 			m.Ldr(x0, RegsField(&cpuRegs.cycle));
@@ -4076,6 +4134,7 @@ namespace {
 
 	BlockFn CompileBlock(u32 pc)
 	{
+		s_block_pc = pc;
 		if (s_code_pos + 8192 > kCodeCacheSize)
 		{
 			s_blocks.clear();
