summaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.md
diff options
context:
space:
mode:
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-28 14:40:08 +0000
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-28 14:40:08 +0000
commit2344eae23c876243c6ab9caa76712812d475ae96 (patch)
tree4b5b7439ec69c9d1bee286053d86438a406fdcd4 /gcc/config/i386/i386.md
parent697a43f829d6c95dbc90b332466f2376ae2cdcd5 (diff)
downloadgcc-2344eae23c876243c6ab9caa76712812d475ae96.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204130 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/i386.md')
-rw-r--r--gcc/config/i386/i386.md18
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 81f565c8891..79db5f82f24 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -17627,7 +17627,7 @@
[(prefetch (match_operand 0 "address_operand")
(match_operand:SI 1 "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;
int locality = INTVAL (operands[2]);
@@ -17638,7 +17638,9 @@
supported by SSE counterpart or the SSE prefetch is not available
(K6 machines). Otherwise use SSE prefetch as it allows specifying
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);
else
operands[1] = const0_rtx;
@@ -17681,6 +17683,18 @@
(symbol_ref "memory_address_length (operands[0], false)"))
(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"
[(match_operand 0 "memory_operand")
(match_operand 1 "memory_operand")]