diff options
author | janis <janis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-22 21:25:15 +0000 |
---|---|---|
committer | janis <janis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-22 21:25:15 +0000 |
commit | 3d9415175681849037636c814145548d0151b680 (patch) | |
tree | 9bb3c7430ea1a6c8f5a120bf2e03e76529ac3173 /gcc/loop.c | |
parent | c830d825e860028a078321f3e39cfe4bb04e22c4 (diff) | |
download | gcc-3d9415175681849037636c814145548d0151b680.tar.gz |
* Makefile.in (loop.o): Depend on OPTABS_H.
* loop.c (expand_builtin_prefetch): Check the prefetch operand
against the predicate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49095 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c index 177efb3734c..1f2a5f31180 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -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); |