Commit db1fb332 by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/56117 (ICE: in cselib_subst_to_values, at cselib.c:1853…

re PR rtl-optimization/56117 (ICE: in cselib_subst_to_values, at cselib.c:1853 with -O2 -fsched2-use-superblocks and __builtin_prefetch())

	PR rtl-optimization/56117
	* sched-deps.c (sched_analyze_2) <case PREFETCH>: For use_cselib
	call cselib_lookup_from_insn on the MEM before calling
	add_insn_mem_dependence.

	* gcc.dg/pr56117.c: New test.

From-SVN: r195513
parent 16917761
2013-01-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/56117
* sched-deps.c (sched_analyze_2) <case PREFETCH>: For use_cselib
call cselib_lookup_from_insn on the MEM before calling
add_insn_mem_dependence.
2013-01-28 Richard Biener <rguenther@suse.de> 2013-01-28 Richard Biener <rguenther@suse.de>
* tree-inline.c (remap_gimple_stmt): Do not assing a BLOCK * tree-inline.c (remap_gimple_stmt): Do not assing a BLOCK
......
...@@ -2720,8 +2720,12 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) ...@@ -2720,8 +2720,12 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
prefetch has only the start address but it is better to have prefetch has only the start address but it is better to have
something than nothing. */ something than nothing. */
if (!deps->readonly) if (!deps->readonly)
add_insn_mem_dependence (deps, true, insn, {
gen_rtx_MEM (Pmode, XEXP (PATTERN (insn), 0))); rtx x = gen_rtx_MEM (Pmode, XEXP (PATTERN (insn), 0));
if (sched_deps_info->use_cselib)
cselib_lookup_from_insn (x, Pmode, true, VOIDmode, insn);
add_insn_mem_dependence (deps, true, insn, x);
}
break; break;
case UNSPEC_VOLATILE: case UNSPEC_VOLATILE:
......
2013-01-28 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/56117
* gcc.dg/pr56117.c: New test.
2013-01-28 Richard Biener <rguenther@suse.de> 2013-01-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/56034 PR tree-optimization/56034
......
/* PR rtl-optimization/56117 */
/* { dg-do compile } */
/* { dg-options "-O2 -fsched2-use-superblocks" } */
void
foo (void *p)
{
__builtin_prefetch (p);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment