]>
Commit | Line | Data |
---|---|---|
5384b728 | 1 | Wed Jul 10 19:12:41 CEST 2002 Janis Johnson <janis187@us.ibm.com> |
2 | ||
3 | * loop.c (emit_prefetch_instructions): Small fix. | |
4 | ||
5 | --- gcc/loop.c.jj Fri Jun 14 21:12:04 2002 | |
6 | +++ gcc/loop.c Wed Aug 14 12:13:43 2002 | |
7 | @@ -4090,11 +4090,17 @@ emit_prefetch_instructions (loop) | |
8 | { | |
9 | rtx reg = gen_reg_rtx (Pmode); | |
10 | rtx loop_start = loop->start; | |
11 | + rtx init_val = info[i].class->initial_value; | |
12 | rtx add_val = simplify_gen_binary (PLUS, Pmode, | |
13 | info[i].giv->add_val, | |
14 | GEN_INT (y * PREFETCH_BLOCK)); | |
15 | ||
16 | - loop_iv_add_mult_emit_before (loop, info[i].class->initial_value, | |
17 | + /* Functions called by LOOP_IV_ADD_EMIT_BEFORE expect a | |
18 | + non-constant INIT_VAL to have the same mode as REG, which | |
19 | + in this case we know to be Pmode. */ | |
20 | + if (GET_MODE (init_val) != Pmode && !CONSTANT_P (init_val)) | |
21 | + init_val = convert_to_mode (Pmode, init_val, 0); | |
22 | + loop_iv_add_mult_emit_before (loop, init_val, | |
23 | info[i].giv->mult_val, | |
24 | add_val, reg, 0, loop_start); | |
25 | emit_insn_before (gen_prefetch (reg, GEN_INT (info[i].write), |