summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-27 12:09:45 +0000
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-27 12:09:45 +0000
commita71343b470ff996f6e0029542acb8b52c8d3918f (patch)
tree2c4c211c86f2b5e2298bdc621704f4ac342aa227
parentf2ffbec61fbff138ea0a9f4a8923884fc4ef38dc (diff)
downloadgcc-a71343b470ff996f6e0029542acb8b52c8d3918f.tar.gz
AVX-512. PR target/70728. Use separate constraint for AVX-512BW
PR target/70728 gcc/ * gcc/config/i386/sse.md (define_insn "<shift_insn><mode>3<mask_name>"): Extract AVX-512BW constraint from AVX. gcc/testsuite/ * gcc.target/i386/pr70728.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@235487 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/sse.md15
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr70728.c30
4 files changed, 49 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index af092647b80..c13b22092d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-27 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ PR target/70728
+ * gcc/config/i386/sse.md (define_insn "<shift_insn><mode>3<mask_name>"):
+ Extract AVX-512BW constraint from AVX.
+
2016-04-27 Jakub Jelinek <jakub@redhat.com>
* BASE-VER: Set to 6.1.1.
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 1ffb3b9a868..a30b0b84501 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -10566,22 +10566,23 @@
(set_attr "mode" "<sseinsnmode>")])
(define_insn "<shift_insn><mode>3<mask_name>"
- [(set (match_operand:VI48_AVX2 0 "register_operand" "=x,v")
+ [(set (match_operand:VI48_AVX2 0 "register_operand" "=x,x,v")
(any_lshift:VI48_AVX2
- (match_operand:VI48_AVX2 1 "register_operand" "0,v")
- (match_operand:SI 2 "nonmemory_operand" "xN,vN")))]
+ (match_operand:VI48_AVX2 1 "register_operand" "0,x,v")
+ (match_operand:SI 2 "nonmemory_operand" "xN,xN,vN")))]
"TARGET_SSE2 && <mask_mode512bit_condition>"
"@
p<vshift><ssemodesuffix>\t{%2, %0|%0, %2}
- vp<vshift><ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
- [(set_attr "isa" "noavx,avx")
+ vp<vshift><ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}
+ vp<vshift><ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
+ [(set_attr "isa" "noavx,avx,avx512bw")
(set_attr "type" "sseishft")
(set (attr "length_immediate")
(if_then_else (match_operand 2 "const_int_operand")
(const_string "1")
(const_string "0")))
- (set_attr "prefix_data16" "1,*")
- (set_attr "prefix" "orig,vex")
+ (set_attr "prefix_data16" "1,*,*")
+ (set_attr "prefix" "orig,vex,evex")
(set_attr "mode" "<sseinsnmode>")])
(define_insn "<shift_insn><mode>3<mask_name>"
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ff70076f807..0097ff61b4d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-21 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ PR target/70728
+ * gcc.target/i386/pr70728.c: New test.
+
2016-04-27 Release Manager
* GCC 6.1.0 released.
diff --git a/gcc/testsuite/gcc.target/i386/pr70728.c b/gcc/testsuite/gcc.target/i386/pr70728.c
new file mode 100644
index 00000000000..89c140dde20
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr70728.c
@@ -0,0 +1,30 @@
+/* PR target/70728 */
+/* { dg-do compile } */
+/* { dg-options "-S -Ofast -march=knl" } */
+
+short a = -15726;
+int b = (int)-7003557328690506537LL;
+short c[5][5][3][6];
+char d[2][5][3][2][4];
+void fn1() {
+ for (int e = 0; e < 3; e = e + 1)
+ for (int f = 0; f < 2; f = f + 1)
+ for (int g = 0; g < 4; g = g + 1)
+ for (int h = 0; h < 3; h = h + 1)
+ for (int i = 0; i < 2; i = i + 1)
+ for (int j = 0; j < 4; j = j + 1)
+ d[f][g][h][i][j] =
+ 7 << (1236110361944357083 >> a + 15728) - 309027590486089270 >>
+ (c[e][f][h][j] + 2147483647 << ~b - 7003557328690506536) -
+ 2147480981;
+}
+int main() {
+ for (int k = 0; k < 5; ++k)
+ for (int l = 0; l < 5; ++l)
+ for (int m = 0; m < 3; ++m)
+ for (int n = 0; n < 4; ++n)
+ c[k][l][m][n] = -2639;
+ fn1();
+}
+
+/* { dg-final { scan-assembler-not "sll\[ \\t\]+\[^\n\]*%\.mm(?:1\[6-9\]|\[2-3\]\[0-9\])" } } */