http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896

--- Comment #14 from Uroš Bizjak <ubizjak at gmail dot com> ---
I have found where corruption of const_int_rtx array happens.

1. Put breakpoint on gen_rtx_CONST_INT to determine address of
const_int_rtx[24], a.k.a (const_int -40) and put HW watchpoint on its address:

Breakpoint 1, gen_rtx_CONST_INT (mode=VOIDmode, arg=0) at
../../gcc-svn/branches/gcc-4_8-branch/gcc/emit-rtl.c:400
400       if (arg >= - MAX_SAVED_CONST_INT && arg <= MAX_SAVED_CONST_INT)
(gdb) p debug_rtx (const_int_rtx[24])
(const_int -40 [0xffffffffffffffd8])
$1 = void
(gdb) d
Delete all breakpoints? (y or n) y
(gdb) p const_int_rtx[24]
$2 = (rtx) 0x2aaaae7ba1f0
(gdb) wa *0x2aaaae7ba1f0
Hardware watchpoint 2: *0x2aaaae7ba1f0

2. Delete gen_rtx_CONST_INT breakpoint and continue.

Hardware watchpoint 2: *0x2aaaae7ba1f0

Old value = 31
New value = -1366096128
0x0000000000605de6 in gen_reg_rtx (mode=V4SImode) at
../../gcc-svn/branches/gcc-4_8-branch/gcc/emit-rtl.c:918
918       regno_reg_rtx[reg_rtx_no++] = val;
(gdb) p debug_rtx (const_int_rtx[24])
(??? bad code 1792
)
$3 = void
(gdb) bt
#0  0x0000000000605de6 in gen_reg_rtx (mode=V4SImode) at
../../gcc-svn/branches/gcc-4_8-branch/gcc/emit-rtl.c:918
#1  0x000000000098aa52 in expand_vec_perm_interleave2 (d=0x7fffffffdde0) at
../../gcc-svn/branches/gcc-4_8-branch/gcc/config/i386/i386.c:39408
#2  0x000000000098b2a0 in ix86_expand_vec_perm_const_1 (d=0x7fffffffdde0) at
../../gcc-svn/branches/gcc-4_8-branch/gcc/config/i386/i386.c:40464
#3  0x000000000098b817 in ix86_vectorize_vec_perm_const_ok (vmode=<optimized
out>, sel=<optimized out>)
    at ../../gcc-svn/branches/gcc-4_8-branch/gcc/config/i386/i386.c:40670
#4  0x000000000072ca92 in can_vec_perm_p (mode=V4SImode, variable=false,
sel=0x7fffffffde80 "\005\001\005\004")
    at ../../gcc-svn/branches/gcc-4_8-branch/gcc/optabs.c:6492
#5  0x00000000008ed744 in lower_vec_perm(struct {...} *) (gsi=0x7fffffffdf50)
    at ../../gcc-svn/branches/gcc-4_8-branch/gcc/tree-vect-generic.c:1207
#6  0x00000000008f0d09 in expand_vector_operations () at
../../gcc-svn/branches/gcc-4_8-branch/gcc/tree-vect-generic.c:1489
#7  0x000000000073fd91 in execute_one_pass (pass=0x1200440 <pass_lower_vector>)
at ../../gcc-svn/branches/gcc-4_8-branch/gcc/passes.c:2333
#8  0x00000000007402c1 in execute_pass_list (pass=0x1200440
<pass_lower_vector>) at ../../gcc-svn/branches/gcc-4_8-branch/gcc/passes.c:2381

Something goes on in expand_vec_perm_interleave2.

Reply via email to