The patch is similar to [1], but use reg_or_subregno instead of REGNO.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596804.html

Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
Ok for trunk?

gcc/ChangeLog:

        PR target/105993
        * config/i386/sse.md (sse4_2_pcmpestr): Replace REGNO with
        reg_or_subregno.
        (sse4_2_pcmpistr): Ditto.
---
 gcc/config/i386/sse.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 64ac490d272..083a7e8885a 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -23250,8 +23250,8 @@ (define_insn_and_split "sse4_2_pcmpestr"
   "&& 1"
   [(const_int 0)]
 {
-  int ecx = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[0]));
-  int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[1]));
+  int ecx = !find_regno_note (curr_insn, REG_UNUSED, reg_or_subregno 
(operands[0]));
+  int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, reg_or_subregno 
(operands[1]));
   int flags = !find_regno_note (curr_insn, REG_UNUSED, FLAGS_REG);
 
   if (ecx)
@@ -23386,8 +23386,8 @@ (define_insn_and_split "sse4_2_pcmpistr"
   "&& 1"
   [(const_int 0)]
 {
-  int ecx = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[0]));
-  int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[1]));
+  int ecx = !find_regno_note (curr_insn, REG_UNUSED, reg_or_subregno 
(operands[0]));
+  int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, reg_or_subregno 
(operands[1]));
   int flags = !find_regno_note (curr_insn, REG_UNUSED, FLAGS_REG);
 
   if (ecx)
-- 
2.18.1

Reply via email to