https://llvm.org/bugs/show_bug.cgi?id=30837
Bug ID: 30837 Summary: logf function call not auto-vectorizing Product: libraries Version: 3.9 Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Loop Optimizer Assignee: unassignedb...@nondot.org Reporter: e...@ericmart.in CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17513 --> https://llvm.org/bugs/attachment.cgi?id=17513&action=edit C test case, sh command to invoke clang, and example faulty IR I've written 2 test functions in C that take in a float array x of size n and output float array f(x), where f is either fabsf or logf. The LLVM 3.9 auto-vectorization docs claim that both functions will be vectorized: http://llvm.org/releases/3.9.0/docs/Vectorizers.html#vectorization-of-function-calls When running with "clang -O3 -march=x86-64 -mavx2 -ffast-math test.c -S -emit-llvm", the function calling fabsf is vectorized while the function calling logf is not. This is with clang 3.9, but I've also confirmed the bug exists back to at least clang 3.7. I've also observed that logf calls break vectorization of more complex loops, and I provide the comparison with fabsf as a reduced test case. I've attached the C program, a sh script to invoke clang with correct arguments, and an example LLVM IR file I produced by running on my system. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs