[llvm-bugs] [Bug 38800] New: Compiler crash in vectorizer with FP induction variable

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 31 16:55:19 PDT 2018


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

            Bug ID: 38800
           Summary: Compiler crash in vectorizer with FP induction
                    variable
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: warren_ristow at playstation.sony.com
                CC: llvm-bugs at lists.llvm.org

We've run into a compiler crash with vectorization when -ffast-math is enabled.
Here is a reduced test-case:

$ cat test.cpp
void foo(float *ptr, float val) {
  for (float f = 0.1f; f < 1.0f; f += 0.01f)
    *ptr += val;
}
$ clang++ -c -O2 -ffast-math -fno-vectorize test.cpp  # No crash
$ clang++ -c -O2 -ffast-math test.cpp
    ...
  Crash Dump Info
    ... 
0.      Program arguments: ...
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 'test.cpp'.
4.      Running pass 'Loop Vectorization' on function '@_Z3fooPff'
    ... 
$

Bisecting identifies that the problem appeared at r276554:

  [Loop Vectorizer] Handling loops FP induction variables.

which was first released in llvm 4.0.  The problem still appears
in ToT (tested r341150).

-- 
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/20180831/cdcd3649/attachment.html>


More information about the llvm-bugs mailing list