<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Infinite recursion in loop vectorizer"
   href="https://llvm.org/bugs/show_bug.cgi?id=28541">28541</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Infinite recursion in loop vectorizer
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Loop Optimizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>benny.kra@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat t.c
a, b, c;
fn1() {
  while (b--) {
    c = a;
    switch (a & 3)
    case 0:
    do
    case 3:
  case 2:
  case 1:
    ;
    while (--c)
      ;
  }
}

$ clang -O2 t.c
...
#8 0x00000000019ffbaa (anonymous
namespace)::InnerLoopVectorizer::createBlockInMask(llvm::BasicBlock*)
(bin/clang)
#9 0x0000000001a000d4 (anonymous
namespace)::InnerLoopVectorizer::createEdgeMask(llvm::BasicBlock*,
llvm::BasicBlock*) (bin/clang)
... repeats 100+ times ...
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 't.c'.
4.      Running pass 'Loop Vectorization' on function '@fn1'
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (trunk 275303) (llvm/trunk 275304)

The crash only occurs at -O2, the bug comes from the interaction of multiple
passes.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>