From e51e6787e40efdd1efcaf85b967f0e155fe0b6e8 Mon Sep 17 00:00:00 2001
From: "Vladimir N. Makarov" <vmakarov@redhat.com>
Date: Tue, 31 Oct 2023 12:33:31 -0400
Subject: [PATCH] Change mv_freq_cmp for decreasing frequency order.

---
 mir-gen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mir-gen.c b/mir-gen.c
index 6fada05cac..eb41dce347 100644
--- a/mir-gen.c
+++ b/mir-gen.c
@@ -6783,8 +6783,8 @@ static int mv_freq_cmp (const void *v1p, const void *v2p) {
   const mv_t *mv1 = (const mv_t *) v1p;
   const mv_t *mv2 = (const mv_t *) v2p;
 
-  if (mv1->freq < mv2->freq) return -1;
-  if (mv1->freq > mv2->freq) return 1;
+  if (mv1->freq > mv2->freq) return -1;
+  if (mv1->freq < mv2->freq) return 1;
   return (long) mv1->bb_insn->index - (long) mv2->bb_insn->index;
 }