This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/63467] New: should have asm statement that does not prevent vectorization
- From: "andi-gcc at firstfloor dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 06 Oct 2014 17:04:11 +0000
- Subject: [Bug tree-optimization/63467] New: should have asm statement that does not prevent vectorization
- Auto-submitted: auto-generated
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 ?