* 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
2002-01-22 Janis Johnson <janis187@us.ibm.com>
+ * Makefile.in (loop.o): Depend on OPTABS_H.
+ * loop.c (expand_builtin_prefetch): Check the prefetch operand
+ against the predicate.
+
PR target/5379
* config/i386/i386.md (prefetch_sse): Specify "p" as a constraint
for the address operand.
loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \
insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \
real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h \
- toplev.h varray.h except.h cselib.h $(TM_P_H)
+ toplev.h varray.h except.h cselib.h $(OPTABS_H) $(TM_P_H)
doloop.o : doloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \
$(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h
unroll.o : unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h function.h \
#include "toplev.h"
#include "predict.h"
#include "insn-flags.h"
+#include "optabs.h"
/* Not really meaningful values, but at least something. */
#ifndef SIMULTANEOUS_PREFETCHES
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);