[llvm-bugs] [Bug 30837] New: logf function call not auto-vectorizing
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Oct 29 11:52:13 PDT 2016
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: unassignedbugs at nondot.org
Reporter: eric at ericmart.in
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161029/b074f4f5/attachment.html>
More information about the llvm-bugs
mailing list