diff mbox series

i386: Fix <any_extend:insn>v4qiv4di2 expander

Message ID CAFULd4bS_Pt7RF87iw99kNUPpQ_LojQqW1OYR76t++Sb=K5+sA@mail.gmail.com
State New
Headers show
Series i386: Fix <any_extend:insn>v4qiv4di2 expander | expand

Commit Message

Uros Bizjak May 18, 2021, 1:58 p.m. UTC
Fix a mode mismatch.

2021-05-18  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
    * config/i386/sse.md (<any_extend:insn>v4qiv4di2):
    Fix a mode mismatch with operand 1.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Pushed to master, will be backported to other release branches.

Uros.
diff mbox series

Patch

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 62f4e15f58c..a4503ddcb73 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -18558,8 +18558,8 @@  (define_expand "<insn>v4qiv4di2"
 {
   if (!MEM_P (operands[1]))
     {
-      operands[1] = force_reg (V8QImode, operands[1]);
-      operands[1] = simplify_gen_subreg (V16QImode, operands[1], V8QImode, 0);
+      operands[1] = force_reg (V4QImode, operands[1]);
+      operands[1] = simplify_gen_subreg (V16QImode, operands[1], V4QImode, 0);
       emit_insn (gen_avx2_<code>v4qiv4di2 (operands[0], operands[1]));
       DONE;
     }