This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for emit_iv_add_mult
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch for emit_iv_add_mult
- From: Michael Hayes <mhayes at redhat dot com>
- Date: Sun, 7 Jan 2001 16:54:52 +1300 (NZDT)
The current code does not update alias information when a new insn is
created by emit_iv_add_mult that has a clobber in parallel.
I think this was an oversight. I've tested that the patch introduces
no new regressions.
2001-01-07 Michael Hayes <mhayes@redhat.com>
* loop.c (emit_iv_add_mult): Use single_set to examine new insn.
Index: loop.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/loop.c,v
retrieving revision 1.315
diff -c -3 -p -r1.315 loop.c
*** loop.c 2001/01/06 23:13:58 1.315
--- loop.c 2001/01/07 03:42:47
*************** emit_iv_add_mult (b, m, a, reg, insert_b
*** 6993,7001 ****
record_base_value (REGNO (SET_DEST (set)), SET_SRC (set), 0);
}
}
! else if (GET_CODE (seq) == SET
! && GET_CODE (SET_DEST (seq)) == REG)
! record_base_value (REGNO (SET_DEST (seq)), SET_SRC (seq), 0);
}
/* Similar to emit_iv_add_mult, but compute cost rather than emitting
--- 6993,7004 ----
record_base_value (REGNO (SET_DEST (set)), SET_SRC (set), 0);
}
}
! else
! {
! rtx set = single_set (seq);
! if (set && GET_CODE (SET_DEST (set)) == REG)
! record_base_value (REGNO (SET_DEST (set)), SET_SRC (set), 0);
! }
}
/* Similar to emit_iv_add_mult, but compute cost rather than emitting