diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2001-01-27 20:24:34 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2001-01-27 20:24:34 +0000 |
commit | de1b33ddc0675f85ca11c28c735408794d133803 (patch) | |
tree | e6e8448e12a53a8dd2b97c74e776752a9ef0c8cf /gcc/expr.c | |
parent | 8a8de62d6de62c383785f84e0d5b3956f73d4f47 (diff) | |
download | gcc-de1b33ddc0675f85ca11c28c735408794d133803.zip gcc-de1b33ddc0675f85ca11c28c735408794d133803.tar.gz gcc-de1b33ddc0675f85ca11c28c735408794d133803.tar.bz2 |
expr.c (emit_move_insn): Add REG_EQUAL note when constant loaded into register was forced into memory.
* expr.c (emit_move_insn): Add REG_EQUAL note when constant loaded
into register was forced into memory.
From-SVN: r39301
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -2709,6 +2709,8 @@ emit_move_insn (x, y) rtx x, y; { enum machine_mode mode = GET_MODE (x); + rtx y_cst = NULL_RTX; + rtx last_insn; x = protect_from_queue (x, 1); y = protect_from_queue (y, 0); @@ -2720,7 +2722,10 @@ emit_move_insn (x, y) if (GET_CODE (y) == CONSTANT_P_RTX) ; else if (CONSTANT_P (y) && ! LEGITIMATE_CONSTANT_P (y)) - y = force_const_mem (mode, y); + { + y_cst = y; + y = force_const_mem (mode, y); + } /* If X or Y are memory references, verify that their addresses are valid for the machine. */ @@ -2740,7 +2745,13 @@ emit_move_insn (x, y) if (mode == BLKmode) abort (); - return emit_move_insn_1 (x, y); + last_insn = emit_move_insn_1 (x, y); + + if (y_cst && GET_CODE (x) == REG) + REG_NOTES (last_insn) + = gen_rtx_EXPR_LIST (REG_EQUAL, y_cst, REG_NOTES (last_insn)); + + return last_insn; } /* Low level part of emit_move_insn. |