This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Combine deletes non noop insns


> >>>>> John David Anglin writes:
> 
> John> The data is inserted to the correct place but I see that the
> John> subreg number is wrong.  It's probably another problem
> John> related to the right justification of small BLKmode types.  How
> John> the code that generated this managed to get the insert location
> John> and the number bits to insert correct, but not the subreg is
> John> strange.
> 
> 	I'd start looking at rtlanal.c:subreg_regno_offset() which Joern
> added to fix a similar problem last July.

It looks like it comes during the initial rtl generation:

#0  gen_rtx_fmt_eee (code=143, mode=SImode, arg0=0x4019db00, arg1=0x40018250,
    arg2=0x349e04) at genrtl.c:581
#1  0x0016e7c0 in gen_insv_32 (operand0=0x8f, operand1=0x4,
    operand2=0x4019db00, operand3=0x4019daa0) at insn-emit.c:1207
#2  0x001740f8 in gen_insv (operand0=0x40018250, operand1=0x40018250,
    operand2=0x400182d0, operand3=0x4019daa0) at insn-emit.c:5409
#3  0x000dde2c in store_bit_field (str_rtx=0x349e04, bitsize=8, bitnum=0,
    fieldmode=SImode, value=0x4019daa0, total_size=5)
    at ../../gcc/gcc/expmed.c:673
#4  0x000de140 in store_bit_field (str_rtx=0x349e04, bitsize=8, bitnum=0,
    fieldmode=SImode, value=0x4019daa0, total_size=5)
    at ../../gcc/gcc/expmed.c:599
#5  0x000de294 in store_bit_field (str_rtx=0x349e04, bitsize=40, bitnum=0,
    fieldmode=DImode, value=0x4019d1e0, total_size=5)
    at ../../gcc/gcc/expmed.c:487
#6  0x000e9158 in emit_group_store (orig_dst=0x4019d1d0, src=0x4018bbf0,
    ssize=5) at ../../gcc/gcc/expr.c:2416
#7  0x001411b0 in assign_parms (fndecl=0x401a2230)
    at ../../gcc/gcc/function.c:4690

(gdb) p debug_rtx (arg0)
(subreg:SI (reg:QI 125) 0)
(gdb) frame 2
#2  0x001740f8 in gen_insv (operand0=0x40018250, operand1=0x40018250,
    operand2=0x400182d0, operand3=0x4019daa0) at insn-emit.c:5409
5409        emit_insn (gen_insv_32 (operands[0], operands[1],
(gdb) p debug_rtx (operand0)
(const_int 8 [0x8])
$8 = void
(gdb) p debug_rtx (operand1)
(const_int 8 [0x8])
$9 = void
(gdb) p debug_rtx (operand2)
(const_int 24 [0x18])
$10 = void
(gdb) p debug_rtx (operand3)
(subreg:SI (reg:DI 94) 0)

I think I see the problem.  It appears to be in the insv expander.
Joern fixed a similar problem recently in extv expander.

Thanks,
Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]