diff options
author | Steven Bosscher <stevenb.gcc@gmail.com> | 2006-01-14 11:04:16 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-01-14 11:04:16 +0000 |
commit | 26fb114d1345224c2af762534482eb8ad117f622 (patch) | |
tree | 1005f3498bda5cb6a91a72d21a00110ae5c54ffb /gcc/gcse.c | |
parent | 2482200f02cb997e951140aafe3415e27b07b8fd (diff) | |
download | gcc-26fb114d1345224c2af762534482eb8ad117f622.zip gcc-26fb114d1345224c2af762534482eb8ad117f622.tar.gz gcc-26fb114d1345224c2af762534482eb8ad117f622.tar.bz2 |
re PR rtl-optimization/24257 (ICE: in extract_insn with -O -fgcse -fgcse-sm)
2006-01-14 Steven Bosscher <stevenb.gcc@gmail.com>
Richard Guenther <rguenther@suse.de>
PR rtl-optimization/24257
* gcse.c (find_moveable_store): Only consider a store movable
when the SET_SRC of the insn can be assigned to a register.
* gcc.dg/torture/pr24257.c: New testcase.
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r109701
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -5664,6 +5664,14 @@ find_moveable_store (rtx insn, int *regs_set_before, int *regs_set_after) if (find_reg_note (insn, REG_EH_REGION, NULL_RTX)) return; + /* Make sure that the SET_SRC of this store insns can be assigned to + a register, or we will fail later on in replace_store_insn, which + 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_p (SET_SRC (set))) + return; + ptr = ldst_entry (dest); if (!ptr->pattern_regs) ptr->pattern_regs = extract_mentioned_regs (dest); |