https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
--- Comment #7 from Richard Biener ---
Why not use a label?
#define N 100
int a[N], b[N], c[N];
main()
{
static void *x __attribute__((used)) = &&bar;
int i;
for (i = 0; i < N; i++) {
bar:
a[i] = b[i] + c[i];
}
}
will get you
.L
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
--- Comment #6 from Andi Kleen ---
For the marker case it's enough if it just stays in the same position in the
basic block and does get duplicated if the BB gets too.
That's somewhat special semantics, that is why I think it would need some way
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
--- Comment #3 from Andrew Pinski ---
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.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
--- Comment #2 from Andi Kleen ---
It's the same with asm("" :::);
At least the vectorizer bombs out on any asm.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
--- Comment #1 from Andrew Pinski ---
Try asm volatile ("":::); instead. Asms without any ::: are considered
clobbering memory.