[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-07 Thread rguenth at gcc dot gnu.org
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

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread jakub at gcc dot gnu.org
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

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread andi-gcc at firstfloor dot org
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

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread pinskia at gcc dot gnu.org
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.

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread andi-gcc at firstfloor dot org
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.

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread pinskia at gcc dot gnu.org
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.