[Bug tree-optimization/89804] optimization opportunity: move variable from stack to register

2019-04-22 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89804

Segher Boessenkool  changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org

--- Comment #4 from Segher Boessenkool  ---
That sounds not too hard to fix, no?

Expand should expand and not do all kinds of other things.  Also, doing this
optimisation in RTL is much harder to do than in gimple, I think.

[Bug tree-optimization/89804] optimization opportunity: move variable from stack to register

2019-03-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89804

--- Comment #3 from Richard Biener  ---
The decision is currently to limit GIMPLE-level memcpy "inlining" to
power-of-two
(mode-precision) (single) moves and leave the rest to RTL expansion.

[Bug tree-optimization/89804] optimization opportunity: move variable from stack to register

2019-03-24 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89804

--- Comment #2 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #1)
> Here is the testcase (and removed use of the headers):
> typedef unsigned long long uint64_t;
> 
> uint64_t uint5korr(const unsigned char *p)
> {
>   uint64_t result = 0;
>   __builtin_memcpy(, p, 5);
>   return result;
> }
>  CUT ---

The memcpy could be changed into a BIT_INSERT which will then be optimized
correctly.

[Bug tree-optimization/89804] optimization opportunity: move variable from stack to register

2019-03-24 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89804

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-24
  Component|other   |tree-optimization
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Andrew Pinski  ---
Here is the testcase (and removed use of the headers):
typedef unsigned long long uint64_t;

uint64_t uint5korr(const unsigned char *p)
{
  uint64_t result = 0;
  __builtin_memcpy(, p, 5);
  return result;
}
 CUT ---