From: Kirill Yukhin Date: Thu, 21 Apr 2016 15:29:29 +0000 (+0000) Subject: AVX-512. PR target/70728. Use separate constraint for AVX-512BW X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2074d80a607e13d3e18b550ae66e7c3be5135d4a;p=gcc.git AVX-512. PR target/70728. Use separate constraint for AVX-512BW PR target/70728 gcc/ * gcc/config/i386/sse.md (define_insn "3"): Extract AVX-512BW constraint from AVX. gcc/testsuite/ * gcc.target/i386/pr70728.c: New test. From-SVN: r235344 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ad22d8fce6..b9ee9d568a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-04-21 Kirill Yukhin + + PR target/70728 + * gcc/config/i386/sse.md (define_insn "3"): + Extract AVX-512BW constraint from AVX. + 2016-04-21 Richard Biener PR tree-optimization/70725 diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 9a8446865f1..48a7abb08f2 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -10138,22 +10138,23 @@ (set_attr "mode" "")]) (define_insn "3" - [(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 && " "@ p\t{%2, %0|%0, %2} - vp\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,avx") + vp\t{%2, %1, %0|%0, %1, %2} + vp\t{%2, %1, %0|%0, %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" "")]) (define_insn "3" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2af83c29205..c881c000dcf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-04-21 Kirill Yukhin + + PR target/70728 + * gcc.target/i386/pr70728.c: New test. + 2016-04-21 Richard Biener PR middle-end/70747 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\])" } } */