public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/63467] New: should have asm statement that does not prevent vectorization
@ 2014-10-06 17:04 andi-gcc at firstfloor dot org
  2014-10-06 17:08 ` [Bug tree-optimization/63467] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: andi-gcc at firstfloor dot org @ 2014-10-06 17:04 UTC (permalink / raw)
  To: gcc-bugs

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 ?


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-07  8:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-06 17:04 [Bug tree-optimization/63467] New: should have asm statement that does not prevent vectorization andi-gcc at firstfloor dot org
2014-10-06 17:08 ` [Bug tree-optimization/63467] " pinskia at gcc dot gnu.org
2014-10-06 17:10 ` andi-gcc at firstfloor dot org
2014-10-06 17:26 ` pinskia at gcc dot gnu.org
2014-10-06 17:31 ` jakub at gcc dot gnu.org
2014-10-06 17:33 ` pinskia at gcc dot gnu.org
2014-10-06 17:46 ` andi-gcc at firstfloor dot org
2014-10-07  8:11 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).