https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
--- Comment #6 from Daniel Fruzynski ---
Not good. Fortunately I found workaround. This is probably the best what one
can get:
[code]
#include
#include
template
struct TypeHelper
{
constexpr unsigned offset();
operator Type&()
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
--- Comment #5 from rguenther at suse dot de ---
On Fri, 14 Dec 2018, bugzi...@poradnik-webmastera.com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
>
> --- Comment #4 from Daniel Fruzynski ---
> OK, I see. Is there any workaroun
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
--- Comment #4 from Daniel Fruzynski ---
OK, I see. Is there any workaround for this? I tried to assign pointer to local
variable directly and with intermediate casting via void*, but it did not help.
Casting S1* to S2* also does not work.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
Status|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
--- Comment #2 from Daniel Fruzynski ---
I spotted that test3 in previous comment uses structure S2 which does not have
union inside. When I changes it to use S1, I got non-vectorized code. So this
workaround does not work.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88487
--- Comment #1 from Daniel Fruzynski ---
Update: when pointers to data are copied to local variables like below,
autovectorization starts working again.
[code]
void test3(S2* __restrict__ s1, S2* __restrict__ s2)
{
double* __restrict__ * __r