diff options
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -54,6 +54,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "toplev.h" #include "predict.h" #include "insn-flags.h" +#include "optabs.h" /* Not really meaningful values, but at least something. */ #ifndef SIMULTANEOUS_PREFETCHES @@ -4019,6 +4020,10 @@ emit_prefetch_instructions (loop) loc = reg; } + /* Make sure the address operand is valid for prefetch. */ + if (! (*insn_data[(int)CODE_FOR_prefetch].operand[0].predicate) + (loc, Pmode)) + loc = force_reg (Pmode, loc); emit_insn_before (gen_prefetch (loc, GEN_INT (info[i].write), GEN_INT (3)), before_insn); |