diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-13 20:43:13 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-02-13 20:43:13 +0000 |
commit | 53cb61a713d27d3f77850e8a368de9d5d7458420 (patch) | |
tree | 1db29b09e26f9b5b55426aa24f11a97d2d706d8c /gcc/rtlanal.c | |
parent | 14e6e4d4fe1ee53d182030644648dcddc54b0a6e (diff) | |
download | gcc-53cb61a713d27d3f77850e8a368de9d5d7458420.tar.gz |
* rtlanal.c (find_reg_equal_equiv_note): New function.
* simplify-rtx.c (simplify_gen_unary, simplify_gen_ternary): New fns.
(simplify_gen_relational, simplify_replace_rtx): Likewise.
* rtl.h: Add declarations for above functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39644 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index a738acb28a5..0eefa70da52 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1485,6 +1485,23 @@ find_regno_note (insn, kind, regno) return 0; } +/* Return a REG_EQUIV or REG_EQUAL note if insn has only a single set and + has such a note. */ + +rtx +find_reg_equal_equiv_note (insn) + rtx insn; +{ + rtx note; + + if (single_set (insn) == 0) + return 0; + else if ((note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != 0) + return note; + else + return find_reg_note (insn, REG_EQUAL, NULL_RTX); +} + /* Return true if DATUM, or any overlap of DATUM, of kind CODE is found in the CALL_INSN_FUNCTION_USAGE information of INSN. */ |