From 6dc0137e894f7ebb95f38e72e711c35f2cab78c7 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 3 May 2017 15:36:29 +0000 Subject: [PATCH] x86: vpermil2p{s,d} have no commutative operands While either of the last two operands can be in memory, they can't be swapped. gcc/ 2017-05-03 Jan Beulich * config/i386/sse.md (xop_vpermil23): Do not allow operand swapping, add (x,x,m,x,n) alternative. From-SVN: r247554 --- gcc/ChangeLog | 8 ++++++++ gcc/config/i386/sse.md | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9ab83758041..0659ddd7693 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-05-03 Jan Beulich + + Backport from mainline + 2017-05-01 Jan Beulich + + * config/i386/sse.md (xop_vpermil23): Do not allow operand + swapping, add (x,x,m,x,n) alternative. + 2017-05-03 Richard Biener Backport from mainline diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 094404bc913..010d00a57dc 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -17105,12 +17105,12 @@ (set_attr "mode" "TI")]) (define_insn "xop_vpermil23" - [(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: 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: 3 "nonimmediate_operand" "xm,x") + (match_operand:SI 4 "const_0_to_3_operand" "n,n")] UNSPEC_VPERMIL2))] "TARGET_XOP" "vpermil2\t{%4, %3, %2, %1, %0|%0, %1, %2, %3, %4}"