This is a known (but poorly documented) issue. Please can you raise a bug on this?

On 05/06/2019 18:43, Max Marrone via cfe-users wrote:
The docs for llvm-mca <https://llvm.org/docs/CommandGuide/llvm-mca.html#using-markers-to-analyze-specific-code-blocks> suggest using inline assembly to mark the region that llvm-mca should examine, i.e.

__asm volatile("# LLVM-MCA-BEGIN");
// ...
__asm volatile("# LLVM-MCA-END");

However, these directives seem to interfere with auto-vectorization.

<source>:8:3: remark: loop not vectorized: call instruction cannot be vectorized [-Rpass-analysis=loop-vectorize]
                __asm volatile("# LLVM-MCA-BEGIN sum_marked");
                ^

<source>:6:2: remark: loop not vectorized: read with atomic ordering or volatile read [-Rpass-analysis=loop-vectorize]
        for (size_t index = 0; index < count; index++)
        ^

<https://godbolt.org/z/NSQchu>
Compiler Explorer link. <https://godbolt.org/z/NSQchu>

Any ideas for a workaround, other than compiling unmarked source and then manually inserting markers into the emitted assembly?

_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Reply via email to