https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71779

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-07-08
     Ever confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to James Greenhalgh from comment #2)
> 
> First, where did the DImode paradoxical subreg come from in the first place,
> and why wasn't it a zero-extend?

Because it is creating the struct:
struct isl_obj {
 isl_obj_type type; // typedef struct isl_obj_vtable *isl_obj_type;
 void *v;
};

Which is passed via one register via the following reules:
C.10  If the argument is a Composite Type and the size in double-words of the
argument is not more than 8
minus NGRN, then the argument is copied into consecutive general-purpose
registers, starting at
x[NGRN]. The argument is passed as though it had been loaded into the registers
from a double-wordaligned
address with an appropriate sequence of LDR instructions loading consecutive
registers from memory (the contents of any unused parts of the registers are
unspecified by this standard). The NGRN
is incremented by the number of registers used. The argument has now been
allocated.

---- CUT -----

So we have two SI objects which then are put into one DI register from the
above rule.  Doing zero-extending does not make sense as we are concatenating
the registers together (via an insert) to form only one.

> 
> Second, why did reload decide it was safe to choose a memory location for a
> paradoxical subreg and widen the size of the memory access?

That I don't know.


> Not marking it this as confirmed as I haven't verified the ISL code to check
> it isn't breaking any Undefined Behavior rules.
It is not based on the above reasoning.

Reply via email to