aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-04-05 18:36:20 +0000
committerJeff Law <law@gcc.gnu.org>2000-04-05 12:36:20 -0600
commit07edd4c51e5767f09a7a4d141efc6bd15742fd1f (patch)
tree90ba96f0b60f9a5f80e58f1335c1dabc7ef715b6 /gcc/optabs.c
parent98dc7b591704d1c8d2b5410746ab20648b3f5390 (diff)
downloadgcc-07edd4c51e5767f09a7a4d141efc6bd15742fd1f.zip
gcc-07edd4c51e5767f09a7a4d141efc6bd15742fd1f.tar.gz
gcc-07edd4c51e5767f09a7a4d141efc6bd15742fd1f.tar.bz2
optabs.c (emit_libcall_block): Remove spurious REG_EQUAL notes from the insn where REG_RETVAL is added.
* optabs.c (emit_libcall_block): Remove spurious REG_EQUAL notes from the insn where REG_RETVAL is added. (emit_no_conflict_block): Ditto. From-SVN: r32935
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 61b1547..dbdea04 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -2699,7 +2699,16 @@ emit_no_conflict_block (insns, target, op0, op1, equiv)
set_unique_reg_note (last, REG_EQUAL, equiv);
}
else
- last = get_last_insn ();
+ {
+ last = get_last_insn ();
+
+ /* Remove any existing REG_EQUAL note from "last", or else it will
+ be mistaken for a note referring to the full contents of the
+ alleged libcall value when found together with the REG_RETVAL
+ note added below. An existing note can come from an insn
+ expansion at "last". */
+ remove_note (last, find_reg_note (last, REG_EQUAL, NULL_RTX));
+ }
if (prev == 0)
first = get_insns ();
@@ -2810,6 +2819,15 @@ emit_libcall_block (insns, target, result, equiv)
if (mov_optab->handlers[(int) GET_MODE (target)].insn_code
!= CODE_FOR_nothing)
set_unique_reg_note (last, REG_EQUAL, copy_rtx (equiv));
+ else
+ {
+ /* Remove any existing REG_EQUAL note from "last", or else it will
+ be mistaken for a note referring to the full contents of the
+ libcall value when found together with the REG_RETVAL note added
+ below. An existing note can come from an insn expansion at
+ "last". */
+ remove_note (last, find_reg_note (last, REG_EQUAL, NULL_RTX));
+ }
if (prev == 0)
first = get_insns ();