aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-03-31 07:00:31 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-03-31 07:00:31 -0500
commit1ff0c00d9f3d9eb2f6e4143c9c3daba4ff3c1d07 (patch)
tree10daf37d36b024785dbba39025f6a8c4db301180
parente6878cb948d1dc2b8cc636a59e7f4847361a3cb8 (diff)
downloadgcc-1ff0c00d9f3d9eb2f6e4143c9c3daba4ff3c1d07.zip
gcc-1ff0c00d9f3d9eb2f6e4143c9c3daba4ff3c1d07.tar.gz
gcc-1ff0c00d9f3d9eb2f6e4143c9c3daba4ff3c1d07.tar.bz2
(insert_regs): If a REG already is in a class but not in the mode we
want, don't do anything to the classes. From-SVN: r3951
-rw-r--r--gcc/cse.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 4404247..a2aac94 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -984,9 +984,14 @@ insert_regs (x, classp, modified)
{
register int regno = REGNO (x);
- if (modified
- || ! (REGNO_QTY_VALID_P (regno)
- && qty_mode[reg_qty[regno]] == GET_MODE (x)))
+ /* If REGNO is in the equivalence table already but is of the
+ wrong mode for that equivalence, don't do anything here. */
+
+ if (REGNO_QTY_VALID_P (regno)
+ && qty_mode[reg_qty[regno]] != GET_MODE (x))
+ return 0;
+
+ if (modified || ! REGNO_QTY_VALID_P (regno))
{
if (classp)
for (classp = classp->first_same_value;