diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2019-01-24 21:48:01 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2019-01-24 21:48:01 +0100 |
commit | 53f2f08b057b6b57b5d8b99db10b63de0634715c (patch) | |
tree | 7683639a9a2979015a7efcd9b91d92cf8cb3caea /gcc/gcse.c | |
parent | 83e23dcd562191e102a63f83822848fa5a3a68ea (diff) | |
download | gcc-53f2f08b057b6b57b5d8b99db10b63de0634715c.zip gcc-53f2f08b057b6b57b5d8b99db10b63de0634715c.tar.gz gcc-53f2f08b057b6b57b5d8b99db10b63de0634715c.tar.bz2 |
re PR rtl-optimization/88948 (ICE in elimination_costs_in_insn, at reload1.c:3640 since r264148)
PR target/88948
* rtl.h (prepare_copy_insn): New prototype.
* gcse.c (prepare_copy_insn): New function, split out from
process_insert_insn.
(process_insert_insn): Use prepare_copy_insn.
* store-motion.c (replace_store_insn): Use prepare_copy_insn
instead of gen_move_insn.
testsuite/ChangeLog:
PR target/88948
* gcc.target/i386/pr88948.c: New test.
From-SVN: r268249
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -1963,14 +1963,11 @@ pre_expr_reaches_here_p (basic_block occr_bb, struct gcse_expr *expr, basic_bloc return rval; } -/* Generate RTL to copy an EXPR to its `reaching_reg' and return it. */ +/* Generate RTL to copy an EXP to REG and return it. */ -static rtx_insn * -process_insert_insn (struct gcse_expr *expr) +rtx_insn * +prepare_copy_insn (rtx reg, rtx exp) { - rtx reg = expr->reaching_reg; - /* Copy the expression to make sure we don't have any sharing issues. */ - rtx exp = copy_rtx (expr->expr); rtx_insn *pat; start_sequence (); @@ -1996,6 +1993,18 @@ process_insert_insn (struct gcse_expr *expr) return pat; } +/* Generate RTL to copy an EXPR to its `reaching_reg' and return it. */ + +static rtx_insn * +process_insert_insn (struct gcse_expr *expr) +{ + rtx reg = expr->reaching_reg; + /* Copy the expression to make sure we don't have any sharing issues. */ + rtx exp = copy_rtx (expr->expr); + + return prepare_copy_insn (reg, exp); +} + /* Add EXPR to the end of basic block BB. This is used by both the PRE and code hoisting. */ |