[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 6 17:33:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> Ok doing this works:
> asm("":"+r"(t)::);
>
>
> But it looks like it should not vectorize due to the number of iterations
> happening for that asm has changed.
Ok, actually if the asm result is used outside the loop, the vectorizer does
not happen but if is not used, then it happens so no wrong code.
You need some output to the inline-asm to cause it to vectorizer:
This:
{int t; asm ("":"+r"(t)::); }
Otherwise if it is volatile, it does not work as that requires that many
iterations of asm to be called.
More information about the Gcc-bugs
mailing list