]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
amdgcn: fix vec_ucmp infinite recursion
authorAndrew Stubbs <ams@baylibre.com>
Wed, 9 Jul 2025 14:59:20 +0000 (14:59 +0000)
committerAndrew Stubbs <ams@baylibre.com>
Mon, 14 Jul 2025 15:46:57 +0000 (15:46 +0000)
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*.

gcc/config/gcn/gcn-valu.md

index f49c1ed0b6dea5b62b8de3c4a7c5f9a2b2ac6057..71a3916d0a1ede2cfc4b476dd88b6733725e89a0 100644 (file)
     /* 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;
   })