===================================================================
@@ -17662,7 +17662,8 @@
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_3DNOW && (!TARGET_PREFETCH_SSE || rw))
+ if (rw && (TARGET_3DNOW || TARGET_PRFCHW)
+ || (TARGET_3DNOW && !TARGET_PREFETCH_SSE))
operands[2] = GEN_INT (3);
else
operands[1] = const0_rtx;
@@ -17693,10 +17694,13 @@
[(prefetch (match_operand:P 0 "address_operand" "p")
(match_operand:SI 1 "const_int_operand" "n")
(const_int 3))]
- "TARGET_3DNOW"
+ "TARGET_3DNOW || TARGET_PRFCHW"
{
if (INTVAL (operands[1]) == 0)
- return "prefetch\t%a0";
+ {
+ gcc_assert (!TARGET_PREFETCH_SSE);
+ return "prefetch\t%a0";
+ }
else
return "prefetchw\t%a0";
}
===================================================================
@@ -3647,11 +3647,11 @@ ix86_option_override_internal (bool main_args_p)
/* Turn on MMX builtins for -msse. */
if (TARGET_SSE)
- {
- ix86_isa_flags |= OPTION_MASK_ISA_MMX & ~ix86_isa_flags_explicit;
- x86_prefetch_sse = true;
- }
+ ix86_isa_flags |= OPTION_MASK_ISA_MMX & ~ix86_isa_flags_explicit;
+ if (TARGET_SSE || TARGET_PRFCHW)
+ x86_prefetch_sse = true;
+
/* Turn on popcnt instruction for -msse4.2 or -mabm. */
if (TARGET_SSE4_2 || TARGET_ABM)
ix86_isa_flags |= OPTION_MASK_ISA_POPCNT & ~ix86_isa_flags_explicit;