diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2016-02-24 13:00:10 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2016-02-24 13:00:10 +0000 |
commit | 0683fd27deb878be38f120cce3acbe4d32132b20 (patch) | |
tree | 8426f9185336f0555756df5729d96189e001db5a /gcc/store-motion.c | |
parent | e53d562a36ead2279b98bc7cde3abe9606b44ee2 (diff) | |
download | gcc-0683fd27deb878be38f120cce3acbe4d32132b20.zip gcc-0683fd27deb878be38f120cce3acbe4d32132b20.tar.gz gcc-0683fd27deb878be38f120cce3acbe4d32132b20.tar.bz2 |
[gcse] PR rtl-optimization/69886: Check target mode in can_assign_to_reg_without_clobbers_p
PR rtl-optimization/69886
* gcse.c (can_assign_to_reg_without_clobbers_p): Accept mode
argument. Use it when checking validity of set instructions.
(want_to_gcse_p): Pass mode to can_assign_to_reg_without_clobbers_p.
(compute_ld_motion_mems): Update can_assign_to_reg_without_clobbers_p
callsite.
* rtl.h (can_assign_to_reg_without_clobbers_p): Update prototype.
* store-motion.c (find_moveable_store): Update
can_assign_to_reg_without_clobbers_p callsite.
* gcc.dg/torture/pr69886.c: New test.
From-SVN: r233662
Diffstat (limited to 'gcc/store-motion.c')
-rw-r--r-- | gcc/store-motion.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/store-motion.c b/gcc/store-motion.c index c3b4d46..fffdffc 100644 --- a/gcc/store-motion.c +++ b/gcc/store-motion.c @@ -557,7 +557,8 @@ find_moveable_store (rtx_insn *insn, int *regs_set_before, int *regs_set_after) assumes that we can do this. But sometimes the target machine has oddities like MEM read-modify-write instruction. See for example PR24257. */ - if (!can_assign_to_reg_without_clobbers_p (SET_SRC (set))) + if (!can_assign_to_reg_without_clobbers_p (SET_SRC (set), + GET_MODE (SET_SRC (set)))) return; ptr = st_expr_entry (dest); |