[llvm-bugs] [Bug 35354] New: [loop vectorize] LLVM cannot vectorize a loop with std::max on float/double.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 17 16:59:39 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=35354

            Bug ID: 35354
           Summary: [loop vectorize] LLVM cannot vectorize a loop with
                    std::max on float/double.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: congh at google.com
                CC: llvm-bugs at lists.llvm.org

LLVM cannot vectorize the following loop:

float a[1000], b[1000];

void foo() {
  for (int i = 0; i < 1000; ++i)
    a[i] = std::max(a[i], b[i]);
}

https://godbolt.org/g/noVjyp

Bug GCC can:

https://godbolt.org/g/nkSuCU

-- 
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/20171118/abb0dc1a/attachment.html>


More information about the llvm-bugs mailing list