Makefile.in (loop.o): Depend on OPTABS_H.
authorJanis Johnson <janis187@us.ibm.com>
Tue, 22 Jan 2002 21:25:15 +0000 (21:25 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Tue, 22 Jan 2002 21:25:15 +0000 (21:25 +0000)
        * Makefile.in (loop.o): Depend on OPTABS_H.
        * loop.c (expand_builtin_prefetch): Check the prefetch operand
        against the predicate.

From-SVN: r49095

gcc/ChangeLog
gcc/Makefile.in
gcc/loop.c

index d5db6ccf7d68aa00f3249b1af83d0f72c75cdbdc..7b966f98a19b6f278e9abfa0067646d60c25a9f8 100644 (file)
@@ -1,5 +1,9 @@
 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.
index ab4ad8a309696ebad6f29dff73937483b188be04..124e589d33364e70845207f91bdb7ceb4db3b56d 100644 (file)
@@ -1470,7 +1470,7 @@ profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
 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 \
index 177efb3734c879ac52f9c225a224811fe7ee256d..1f2a5f3118055abb7f047b086c34123105fd3b28 100644 (file)
@@ -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);