From: Alexander Ivchenko Date: Fri, 12 Sep 2014 07:34:31 +0000 (+0000) Subject: AVX-512. Extend gather insn patterns. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be746da138049580dbb3cf7b11ddf0cc77b46aff;p=gcc.git AVX-512. Extend gather insn patterns. gcc/ * config/i386/sse.md (define_expand "_gathersi"): Rename from "avx512f_gathersi". (define_insn "*avx512f_gathersi"): Use VI48F. (define_insn "*avx512f_gathersi_2"): Ditto. (define_expand "_gatherdi"): Rename from "avx512f_gatherdi". (define_insn "*avx512f_gatherdi"): Use VI48F. (define_insn "*avx512f_gatherdi_2"): Use VI48F, add 128/256-bit wide versions. (define_expand "_scattersi"): Rename from "avx512f_scattersi". (define_insn "*avx512f_scattersi"): Use VI48F. (define_expand "_scatterdi"): Rename from "avx512f_scatterdi". (define_insn "*avx512f_scatterdi"): Use VI48F. Co-Authored-By: Andrey Turetskiy Co-Authored-By: Anna Tikhonova Co-Authored-By: Ilya Tocar Co-Authored-By: Ilya Verbin Co-Authored-By: Kirill Yukhin Co-Authored-By: Maxim Kuznetsov Co-Authored-By: Michael Zolotukhin From-SVN: r215201 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 27e0b599aed..4c9a3704a9e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,29 @@ +2014-09-12 Alexander Ivchenko + Maxim Kuznetsov + Anna Tikhonova + Ilya Tocar + Andrey Turetskiy + Ilya Verbin + Kirill Yukhin + Michael Zolotukhin + + * config/i386/sse.md + (define_expand "_gathersi"): Rename from + "avx512f_gathersi". + (define_insn "*avx512f_gathersi"): Use VI48F. + (define_insn "*avx512f_gathersi_2"): Ditto. + (define_expand "_gatherdi"): Rename from + "avx512f_gatherdi". + (define_insn "*avx512f_gatherdi"): Use VI48F. + (define_insn "*avx512f_gatherdi_2"): Use VI48F, add 128/256-bit + wide versions. + (define_expand "_scattersi"): Rename from + "avx512f_scattersi". + (define_insn "*avx512f_scattersi"): Use VI48F. + (define_expand "_scatterdi"): Rename from + "avx512f_scatterdi". + (define_insn "*avx512f_scatterdi"): Use VI48F. + 2014-09-12 Richard Sandiford * ira.h (ira_finish_once): Delete. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index e182582bc84..40b8f8342f3 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -16650,10 +16650,10 @@ (set_attr "prefix" "vex") (set_attr "mode" "")]) -(define_expand "avx512f_gathersi" - [(parallel [(set (match_operand:VI48F_512 0 "register_operand") - (unspec:VI48F_512 - [(match_operand:VI48F_512 1 "register_operand") +(define_expand "_gathersi" + [(parallel [(set (match_operand:VI48F 0 "register_operand") + (unspec:VI48F + [(match_operand:VI48F 1 "register_operand") (match_operand: 4 "register_operand") (mem: (match_par_dup 6 @@ -16670,9 +16670,9 @@ }) (define_insn "*avx512f_gathersi" - [(set (match_operand:VI48F_512 0 "register_operand" "=&v") - (unspec:VI48F_512 - [(match_operand:VI48F_512 1 "register_operand" "0") + [(set (match_operand:VI48F 0 "register_operand" "=&v") + (unspec:VI48F + [(match_operand:VI48F 1 "register_operand" "0") (match_operand: 7 "register_operand" "2") (match_operator: 6 "vsib_mem_operator" [(unspec:P @@ -16689,8 +16689,8 @@ (set_attr "mode" "")]) (define_insn "*avx512f_gathersi_2" - [(set (match_operand:VI48F_512 0 "register_operand" "=&v") - (unspec:VI48F_512 + [(set (match_operand:VI48F 0 "register_operand" "=&v") + (unspec:VI48F [(pc) (match_operand: 6 "register_operand" "1") (match_operator: 5 "vsib_mem_operator" @@ -16708,9 +16708,9 @@ (set_attr "mode" "")]) -(define_expand "avx512f_gatherdi" - [(parallel [(set (match_operand:VI48F_512 0 "register_operand") - (unspec:VI48F_512 +(define_expand "_gatherdi" + [(parallel [(set (match_operand:VI48F 0 "register_operand") + (unspec:VI48F [(match_operand: 1 "register_operand") (match_operand:QI 4 "register_operand") (mem: @@ -16728,8 +16728,8 @@ }) (define_insn "*avx512f_gatherdi" - [(set (match_operand:VI48F_512 0 "register_operand" "=&v") - (unspec:VI48F_512 + [(set (match_operand:VI48F 0 "register_operand" "=&v") + (unspec:VI48F [(match_operand: 1 "register_operand" "0") (match_operand:QI 7 "register_operand" "2") (match_operator: 6 "vsib_mem_operator" @@ -16747,8 +16747,8 @@ (set_attr "mode" "")]) (define_insn "*avx512f_gatherdi_2" - [(set (match_operand:VI48F_512 0 "register_operand" "=&v") - (unspec:VI48F_512 + [(set (match_operand:VI48F 0 "register_operand" "=&v") + (unspec:VI48F [(pc) (match_operand:QI 6 "register_operand" "1") (match_operator: 5 "vsib_mem_operator" @@ -16762,22 +16762,27 @@ "TARGET_AVX512F" { if (mode != mode) - return "vgatherq\t{%5, %t0%{%1%}|%t0%{%1%}, %g5}"; + { + if (GET_MODE_SIZE (mode) != 64) + return "vgatherq\t{%5, %x0%{%1%}|%t0%{%1%}, %g5}"; + else + return "vgatherq\t{%5, %t0%{%1%}|%t0%{%1%}, %g5}"; + } return "vgatherq\t{%5, %0%{%1%}|%0%{%1%}, %g5}"; } [(set_attr "type" "ssemov") (set_attr "prefix" "evex") (set_attr "mode" "")]) -(define_expand "avx512f_scattersi" - [(parallel [(set (mem:VI48F_512 +(define_expand "_scattersi" + [(parallel [(set (mem:VI48F (match_par_dup 5 [(match_operand 0 "vsib_address_operand") (match_operand: 2 "register_operand") (match_operand:SI 4 "const1248_operand")])) - (unspec:VI48F_512 + (unspec:VI48F [(match_operand: 1 "register_operand") - (match_operand:VI48F_512 3 "register_operand")] + (match_operand:VI48F 3 "register_operand")] UNSPEC_SCATTER)) (clobber (match_scratch: 6))])] "TARGET_AVX512F" @@ -16788,15 +16793,15 @@ }) (define_insn "*avx512f_scattersi" - [(set (match_operator:VI48F_512 5 "vsib_mem_operator" + [(set (match_operator:VI48F 5 "vsib_mem_operator" [(unspec:P [(match_operand:P 0 "vsib_address_operand" "Tv") (match_operand: 2 "register_operand" "v") (match_operand:SI 4 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) - (unspec:VI48F_512 + (unspec:VI48F [(match_operand: 6 "register_operand" "1") - (match_operand:VI48F_512 3 "register_operand" "v")] + (match_operand:VI48F 3 "register_operand" "v")] UNSPEC_SCATTER)) (clobber (match_scratch: 1 "=&Yk"))] "TARGET_AVX512F" @@ -16805,13 +16810,13 @@ (set_attr "prefix" "evex") (set_attr "mode" "")]) -(define_expand "avx512f_scatterdi" - [(parallel [(set (mem:VI48F_512 +(define_expand "_scatterdi" + [(parallel [(set (mem:VI48F (match_par_dup 5 [(match_operand 0 "vsib_address_operand") - (match_operand:V8DI 2 "register_operand") + (match_operand: 2 "register_operand") (match_operand:SI 4 "const1248_operand")])) - (unspec:VI48F_512 + (unspec:VI48F [(match_operand:QI 1 "register_operand") (match_operand: 3 "register_operand")] UNSPEC_SCATTER)) @@ -16824,13 +16829,13 @@ }) (define_insn "*avx512f_scatterdi" - [(set (match_operator:VI48F_512 5 "vsib_mem_operator" + [(set (match_operator:VI48F 5 "vsib_mem_operator" [(unspec:P [(match_operand:P 0 "vsib_address_operand" "Tv") - (match_operand:V8DI 2 "register_operand" "v") + (match_operand: 2 "register_operand" "v") (match_operand:SI 4 "const1248_operand" "n")] UNSPEC_VSIBADDR)]) - (unspec:VI48F_512 + (unspec:VI48F [(match_operand:QI 6 "register_operand" "1") (match_operand: 3 "register_operand" "v")] UNSPEC_SCATTER))