Hello,
This patch fixes operands in kunpck[hi|si|di] insn patterns.
Bootstrapped (regtesting in progress).

gcc/
        * gcc/config/i386/i386.md (define_insn "kunpckhi"): Fix
        operand in pattern.
        (define_insn "kunpcksi"): Ditto. 
        (define_insn "kunpckdi"): Ditto. 

Is it ok for trunk and gcc-5-branch if testing pass?

--
Thanks, K

commit 433bd69b29c62d0c65e5a0772d564b0d930ee8c5
Author: Kirill Yukhin <kirill.yuk...@intel.com>
Date:   Fri Sep 18 13:51:26 2015 +0300

    AVX-512. Fix patterns for kunpck insns.

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index f7230f0..2f8cdb2 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -8603,7 +8603,7 @@
   [(set (match_operand:HI 0 "register_operand" "=k")
        (ior:HI
          (ashift:HI
-           (match_operand:HI 1 "register_operand" "k")
+           (zero_extend:HI (match_operand:QI 1 "register_operand" "k"))
            (const_int 8))
          (zero_extend:HI (match_operand:QI 2 "register_operand" "k"))))]
   "TARGET_AVX512F"
@@ -8616,9 +8616,9 @@
   [(set (match_operand:SI 0 "register_operand" "=k")
        (ior:SI
          (ashift:SI
-           (match_operand:SI 1 "register_operand" "k")
+           (zero_extend:SI (match_operand:HI 1 "register_operand" "k"))
            (const_int 16))
-         (zero_extend:SI (subreg:HI (match_operand:SI 2 "register_operand" 
"k") 0))))]
+         (zero_extend:SI (match_operand:HI 2 "register_operand" "k"))))]
   "TARGET_AVX512BW"
   "kunpckwd\t{%2, %1, %0|%0, %1, %2}"
   [(set_attr "mode" "SI")])
@@ -8627,9 +8627,9 @@
   [(set (match_operand:DI 0 "register_operand" "=k")
        (ior:DI
          (ashift:DI
-           (match_operand:DI 1 "register_operand" "k")
+           (zero_extend:DI (match_operand:SI 1 "register_operand" "k"))
            (const_int 32))
-         (zero_extend:DI (subreg:SI (match_operand:DI 2 "register_operand" 
"k") 0))))]
+         (zero_extend:DI (match_operand:SI 2 "register_operand" "k"))))]
   "TARGET_AVX512BW"
   "kunpckdq\t{%2, %1, %0|%0, %1, %2}"
   [(set_attr "mode" "DI")])

Reply via email to