https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467
Bug ID: 63467 Summary: should have asm statement that does not prevent vectorization Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Currently any inline asm statement in a loop prevents vectorization, like #define N 100 int a[N], b[N], c[N]; main() { int i; for (i = 0; i < N; i++) { asm(""); a[i] = b[i] + c[i]; } } Without the asm the loop vectorizes fine. This is a problem if you want to add markers into the loop body for static assembler code analysis (for example with IACA, https://software.intel.com/en-us/articles/intel-architecture-code-analyzer) Should have some way to tell the compiler that a particular inline asm statement does not have any side effects that prevent vectorization or other loop transformations. Perhaps an asm const ?