https://gcc.gnu.org/g:d8680bac95c68002d7e4b13ae1dab1116fdfefc6

commit r16-2241-gd8680bac95c68002d7e4b13ae1dab1116fdfefc6
Author: Andrew Stubbs <a...@baylibre.com>
Date:   Wed Jul 9 14:59:20 2025 +0000

    amdgcn: fix vec_ucmp infinite recursion
    
    I suppose this pattern doesn't get used much! The unsigned compare was 
meant to
    be defined using the signed compare pattern, but actually ended up trying to
    recursively call itself.  This patch fixes the issue in the obvious way.
    
    gcc/ChangeLog:
    
            * config/gcn/gcn-valu.md (vec_cmpu<mode>di_exec): Call gen_vec_cmp*,
            not gen_vec_cmpu*.

Diff:
---
 gcc/config/gcn/gcn-valu.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md
index f49c1ed0b6de..71a3916d0a1e 100644
--- a/gcc/config/gcn/gcn-valu.md
+++ b/gcc/config/gcn/gcn-valu.md
@@ -3792,9 +3792,9 @@
     /* Unsigned comparisons use the same patterns as signed comparisons,
        except that they use unsigned operators (e.g. LTU vs LT).
        The '%E1' directive then does the Right Thing.  */
-    emit_insn (gen_vec_cmpu<mode>di_exec (operands[0], operands[1],
-                                         operands[2], operands[3],
-                                         operands[4]));
+    emit_insn (gen_vec_cmp<mode>di_exec (operands[0], operands[1],
+                                        operands[2], operands[3],
+                                        operands[4]));
     DONE;
   })

Reply via email to