This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 ?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]