x86: vpermil2p{s,d} have no commutative operands
authorJan Beulich <jbeulich@suse.com>
Tue, 2 May 2017 08:19:26 +0000 (08:19 +0000)
committerJan Beulich <jbeulich@gcc.gnu.org>
Tue, 2 May 2017 08:19:26 +0000 (08:19 +0000)
While either of the last two operands can be in memory, they can't be
swapped.

gcc/
2017-05-01  Jan Beulich  <jbeulich@suse.com>

* config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
swapping, add (x,x,m,x,n) alternative.

From-SVN: r247464

gcc/ChangeLog
gcc/config/i386/sse.md

index 667eaa13eb71c0bc05e319b12ee83bf54d3518ab..72110a2a88056152597911b919a4929768c29a61 100644 (file)
@@ -1,3 +1,8 @@
+2017-05-01  Jan Beulich  <jbeulich@suse.com>
+
+       * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
+       swapping, add (x,x,m,x,n) alternative.
+
 2017-05-01  Nathan Sidwell  <nathan@acm.org>
 
        * calls.c (combine_pending_stack_adjustment_and_call): Remove
index e8ccb1e10c35586f88506c77f874f93df5f1616b..beb155d07da47a8037ba8e11b02caf107cd65c64 100644 (file)
    (set_attr "mode" "TI")])
 
 (define_insn "xop_vpermil2<mode>3"
-  [(set (match_operand:VF_128_256 0 "register_operand" "=x")
+  [(set (match_operand:VF_128_256 0 "register_operand" "=x,x")
        (unspec:VF_128_256
-         [(match_operand:VF_128_256 1 "register_operand" "x")
-          (match_operand:VF_128_256 2 "nonimmediate_operand" "%x")
-          (match_operand:<sseintvecmode> 3 "nonimmediate_operand" "xm")
-          (match_operand:SI 4 "const_0_to_3_operand" "n")]
+         [(match_operand:VF_128_256 1 "register_operand" "x,x")
+          (match_operand:VF_128_256 2 "nonimmediate_operand" "x,m")
+          (match_operand:<sseintvecmode> 3 "nonimmediate_operand" "xm,x")
+          (match_operand:SI 4 "const_0_to_3_operand" "n,n")]
          UNSPEC_VPERMIL2))]
   "TARGET_XOP"
   "vpermil2<ssemodesuffix>\t{%4, %3, %2, %1, %0|%0, %1, %2, %3, %4}"