Commit b868b7ca by Alexander Ivchenko Committed by Kirill Yukhin

i386.md (prefetch): Allow TARGET_AVX512PF.

        * config/i386/i386.md (prefetch): Allow TARGET_AVX512PF.
        (*prefetch_avx512pf_<mode>): New.
        * config/i386/sse.md (avx512f_vmcmp<mode>3): Ditto.
        (avx512f_maskcmp<mode>3): Ditto.
        (vashrv16si3): Ditto.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Anna Tikhonova <anna.tikhonova@intel.com>
Co-Authored-By: Ilya Tocar <ilya.tocar@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
Co-Authored-By: Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>
Co-Authored-By: Sergey Lega <sergey.s.lega@intel.com>

From-SVN: r204130
parent c003c6d6
...@@ -8,6 +8,22 @@ ...@@ -8,6 +8,22 @@
Kirill Yukhin <kirill.yukhin@intel.com> Kirill Yukhin <kirill.yukhin@intel.com>
Michael Zolotukhin <michael.v.zolotukhin@intel.com> Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* config/i386/i386.md (prefetch): Allow TARGET_AVX512PF.
(*prefetch_avx512pf_<mode>): New.
* config/i386/sse.md (avx512f_vmcmp<mode>3): Ditto.
(avx512f_maskcmp<mode>3): Ditto.
(vashrv16si3): Ditto.
2013-10-28 Alexander Ivchenko <alexander.ivchenko@intel.com>
Maxim Kuznetsov <maxim.kuznetsov@intel.com>
Sergey Lega <sergey.s.lega@intel.com>
Anna Tikhonova <anna.tikhonova@intel.com>
Ilya Tocar <ilya.tocar@intel.com>
Andrey Turetskiy <andrey.turetskiy@intel.com>
Ilya Verbin <ilya.verbin@intel.com>
Kirill Yukhin <kirill.yukhin@intel.com>
Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* config/i386/i386.md (any_truncate): New. * config/i386/i386.md (any_truncate): New.
(trunsuffix): Ditto. (trunsuffix): Ditto.
* config/i386/predicates.md (const_8_to_9_operand): New. * config/i386/predicates.md (const_8_to_9_operand): New.
...@@ -17627,7 +17627,7 @@ ...@@ -17627,7 +17627,7 @@
[(prefetch (match_operand 0 "address_operand") [(prefetch (match_operand 0 "address_operand")
(match_operand:SI 1 "const_int_operand") (match_operand:SI 1 "const_int_operand")
(match_operand:SI 2 "const_int_operand"))] (match_operand:SI 2 "const_int_operand"))]
"TARGET_PREFETCH_SSE || TARGET_PRFCHW" "TARGET_PREFETCH_SSE || TARGET_PRFCHW || TARGET_AVX512PF"
{ {
bool write = INTVAL (operands[1]) != 0; bool write = INTVAL (operands[1]) != 0;
int locality = INTVAL (operands[2]); int locality = INTVAL (operands[2]);
...@@ -17638,7 +17638,9 @@ ...@@ -17638,7 +17638,9 @@
supported by SSE counterpart or the SSE prefetch is not available supported by SSE counterpart or the SSE prefetch is not available
(K6 machines). Otherwise use SSE prefetch as it allows specifying (K6 machines). Otherwise use SSE prefetch as it allows specifying
of locality. */ of locality. */
if (TARGET_PRFCHW && (write || !TARGET_PREFETCH_SSE)) if (TARGET_AVX512PF && write)
operands[2] = const1_rtx;
else if (TARGET_PRFCHW && (write || !TARGET_PREFETCH_SSE))
operands[2] = GEN_INT (3); operands[2] = GEN_INT (3);
else else
operands[1] = const0_rtx; operands[1] = const0_rtx;
...@@ -17681,6 +17683,18 @@ ...@@ -17681,6 +17683,18 @@
(symbol_ref "memory_address_length (operands[0], false)")) (symbol_ref "memory_address_length (operands[0], false)"))
(set_attr "memory" "none")]) (set_attr "memory" "none")])
(define_insn "*prefetch_avx512pf_<mode>"
[(prefetch (match_operand:P 0 "address_operand" "p")
(const_int 1)
(const_int 1))]
"TARGET_AVX512PF"
"prefetchwt1\t%a0";
[(set_attr "type" "sse")
(set_attr "prefix" "evex")
(set (attr "length_address")
(symbol_ref "memory_address_length (operands[0], false)"))
(set_attr "memory" "none")])
(define_expand "stack_protect_set" (define_expand "stack_protect_set"
[(match_operand 0 "memory_operand") [(match_operand 0 "memory_operand")
(match_operand 1 "memory_operand")] (match_operand 1 "memory_operand")]
......
...@@ -2010,6 +2010,34 @@ ...@@ -2010,6 +2010,34 @@
(set_attr "prefix" "evex") (set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")]) (set_attr "mode" "<sseinsnmode>")])
(define_insn "avx512f_vmcmp<mode>3"
[(set (match_operand:<avx512fmaskmode> 0 "register_operand" "=k")
(and:<avx512fmaskmode>
(unspec:<avx512fmaskmode>
[(match_operand:VF_128 1 "register_operand" "v")
(match_operand:VF_128 2 "nonimmediate_operand" "vm")
(match_operand:SI 3 "const_0_to_31_operand" "n")]
UNSPEC_PCMP)
(const_int 1)))]
"TARGET_AVX512F"
"vcmp<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}"
[(set_attr "type" "ssecmp")
(set_attr "length_immediate" "1")
(set_attr "prefix" "evex")
(set_attr "mode" "<ssescalarmode>")])
(define_insn "avx512f_maskcmp<mode>3"
[(set (match_operand:<avx512fmaskmode> 0 "register_operand" "=k")
(match_operator:<avx512fmaskmode> 3 "sse_comparison_operator"
[(match_operand:VF 1 "register_operand" "v")
(match_operand:VF 2 "nonimmediate_operand" "vm")]))]
"TARGET_SSE"
"vcmp%D3<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "ssecmp")
(set_attr "length_immediate" "1")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
(define_insn "<sse>_comi" (define_insn "<sse>_comi"
[(set (reg:CCFP FLAGS_REG) [(set (reg:CCFP FLAGS_REG)
(compare:CCFP (compare:CCFP
...@@ -12148,6 +12176,12 @@ ...@@ -12148,6 +12176,12 @@
} }
}) })
(define_expand "vashrv16si3"
[(set (match_operand:V16SI 0 "register_operand")
(ashiftrt:V16SI (match_operand:V16SI 1 "register_operand")
(match_operand:V16SI 2 "nonimmediate_operand")))]
"TARGET_AVX512F")
(define_expand "vashrv8si3" (define_expand "vashrv8si3"
[(set (match_operand:V8SI 0 "register_operand") [(set (match_operand:V8SI 0 "register_operand")
(ashiftrt:V8SI (match_operand:V8SI 1 "register_operand") (ashiftrt:V8SI (match_operand:V8SI 1 "register_operand")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment