mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 22:01:27 +08:00
re PR rtl-optimization/36929 (internal compiler error: Segmentation fault)
PR rtl-optimization/36929 * dse.c (replace_inc_dec): Use emit_insn_before instead of add_insn_before and fix argument order. (replace_inc_dec_mem): Handle NULL rtx. From-SVN: r138333
This commit is contained in:
parent
2a9cc4de00
commit
2212958921
431
gcc/ChangeLog
431
gcc/ChangeLog
File diff suppressed because it is too large
Load Diff
21
gcc/dse.c
21
gcc/dse.c
@ -783,10 +783,9 @@ replace_inc_dec (rtx *r, void *d)
|
||||
{
|
||||
rtx r1 = XEXP (x, 0);
|
||||
rtx c = gen_int_mode (Pmode, data->size);
|
||||
add_insn_before (data->insn,
|
||||
gen_rtx_SET (Pmode, r1,
|
||||
gen_rtx_PLUS (Pmode, r1, c)),
|
||||
NULL);
|
||||
emit_insn_before (gen_rtx_SET (Pmode, r1,
|
||||
gen_rtx_PLUS (Pmode, r1, c)),
|
||||
data->insn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -795,10 +794,9 @@ replace_inc_dec (rtx *r, void *d)
|
||||
{
|
||||
rtx r1 = XEXP (x, 0);
|
||||
rtx c = gen_int_mode (Pmode, -data->size);
|
||||
add_insn_before (data->insn,
|
||||
gen_rtx_SET (Pmode, r1,
|
||||
gen_rtx_PLUS (Pmode, r1, c)),
|
||||
NULL);
|
||||
emit_insn_before (gen_rtx_SET (Pmode, r1,
|
||||
gen_rtx_PLUS (Pmode, r1, c)),
|
||||
data->insn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -809,8 +807,7 @@ replace_inc_dec (rtx *r, void *d)
|
||||
insn that contained it. */
|
||||
rtx add = XEXP (x, 0);
|
||||
rtx r1 = XEXP (add, 0);
|
||||
add_insn_before (data->insn,
|
||||
gen_rtx_SET (Pmode, r1, add), NULL);
|
||||
emit_insn_before (gen_rtx_SET (Pmode, r1, add), data->insn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -827,12 +824,12 @@ static int
|
||||
replace_inc_dec_mem (rtx *r, void *d)
|
||||
{
|
||||
rtx x = *r;
|
||||
if (GET_CODE (x) == MEM)
|
||||
if (x != NULL_RTX && MEM_P (x))
|
||||
{
|
||||
struct insn_size data;
|
||||
|
||||
data.size = GET_MODE_SIZE (GET_MODE (x));
|
||||
data.insn = (rtx)d;
|
||||
data.insn = (rtx) d;
|
||||
|
||||
for_each_rtx (&XEXP (x, 0), replace_inc_dec, &data);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user