This is the mail archive of the gcc-patches@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: [PATCH] Fix wrong code on aarch64 due to paradoxical subreg


On 07/29/16 09:02, Segher Boessenkool wrote:
> On Thu, Jul 28, 2016 at 08:59:44PM +0000, Bernd Edlinger wrote:
>> (insn 1047 1044 1048 101 (set (reg/f:DI 481)
>>           (subreg:DI (reg/f:SI 545) 0)) isl_input.c:2496 50 {*movdi_aarch64}
>>        (nil))
>
> In your first mail you showed reg 481 as _not_ being REG_POINTER:
>
> (insn 1047 1046 1048 (set (reg:DI 481)
>          (subreg:DI (reg/f:SI 479) 0)) y.c:12702 -1
>       (nil))
>
> (note the lack of /f).  So which is it?  REG_POINTER here is not correct
> as far as I can see.
>

Oh yes, that's an interesting point, in expand I still see this:


(insn 1047 1046 1048 (set (reg:DI 481)
         (subreg:DI (reg/f:SI 479) 0)) isl_input.c:2496 -1
      (nil))

But in the last dump before combine I have this:

(insn 1047 1044 1048 101 (set (reg/f:DI 481)
         (subreg:DI (reg/f:SI 545) 0)) isl_input.c:2496 50 {*movdi_aarch64}
      (nil))


However I was not really surpised by that, because the reg 545 does
in deed hold a pointer value: &isl_obj_map_vtable

(insn 22 17 23 51 (set (reg/f:SI 544)
         (high:SI (symbol_ref:SI ("isl_obj_map_vtable") [flags 0xc0] 
<var_decl 0x7f83d3273f30 isl_obj_map_vtable>))) isl_input.c:2415 49 
{*movsi_aarch64}
      (nil))
(insn 23 22 24 51 (set (reg/f:SI 545)
         (lo_sum:SI (reg/f:SI 544)
             (symbol_ref:SI ("isl_obj_map_vtable") [flags 0xc0] 
<var_decl 0x7f83d3273f30 isl_obj_map_vtable>))) isl_input.c:2415 917 
{add_losym_si}
      (expr_list:REG_DEAD (reg/f:SI 544)
         (expr_list:REG_EQUAL (symbol_ref:SI ("isl_obj_map_vtable") 
[flags 0xc0] <var_decl 0x7f83d3273f30 isl_obj_map_vtable>)
             (nil))))

The "reg/f:DI 481" first appeared in cse1.


I'll try to see what's happening there next....


Thanks
Bernd.


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