<html>
    <head>
      <base href="http://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 --- - SLP vectorizer crash"
   href="http://llvm.org/bugs/show_bug.cgi?id=15800">15800</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SLP vectorizer crash
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vince@macports.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10388" name="attach_10388" title="Preprocessed source and other /tmp files">attachment 10388</a> <a href="attachment.cgi?id=10388&action=edit" title="Preprocessed source and other /tmp files">[details]</a></span>
Preprocessed source and other /tmp files

Clang (r179938) SLP vectorizer crashes on this code (see attachement):

Assertion failed: (isValidElementType(ElementType) && "Elements of a VectorType
must be a primitive type"), function get, file Type.cpp, line 714.
0  libLLVM-3.3svn.dylib 0x000000010bd11468 llvm::sys::PrintStackTrace(__sFILE*)
+ 40
1  libLLVM-3.3svn.dylib 0x000000010bd11a54 SignalHandler(int) + 548
2  libsystem_c.dylib    0x00007fff8c24d94a _sigtramp + 26
3  libsystem_c.dylib    0x00007fcbd05cc990 _sigtramp + 1144516704
4  libLLVM-3.3svn.dylib 0x000000010bd11786 abort + 22
5  libLLVM-3.3svn.dylib 0x000000010bd11761 __assert_rtn + 81
6  libLLVM-3.3svn.dylib 0x000000010b7c620d llvm::VectorType::get(llvm::Type*,
unsigned int) + 301
7  libLLVM-3.3svn.dylib 0x000000010bdbe93b
llvm::BoUpSLP::getScalarizationCost(llvm::ArrayRef<llvm::Value*>) + 59
8  libLLVM-3.3svn.dylib 0x000000010bdbc053 (anonymous
namespace)::SLPVectorizer::tryToVectorizePair(llvm::Value*, llvm::Value*,
llvm::BoUpSLP&) + 307
9  libLLVM-3.3svn.dylib 0x000000010bdbb597 (anonymous
namespace)::SLPVectorizer::runOnFunction(llvm::Function&) + 1047
10 libLLVM-3.3svn.dylib 0x000000010b7ba85b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 347
11 libLLVM-3.3svn.dylib 0x000000010bebf9cb (anonymous
namespace)::CGPassManager::runOnModule(llvm::Module&) + 1563
12 libLLVM-3.3svn.dylib 0x000000010b7bae51
llvm::MPPassManager::runOnModule(llvm::Module&) + 433
13 libLLVM-3.3svn.dylib 0x000000010b7bb3dc
llvm::PassManagerImpl::run(llvm::Module&) + 204
14 libLLVM-3.3svn.dylib 0x000000010b7bb5cd
llvm::PassManager::run(llvm::Module&) + 13
15 clang                0x000000010a01223a
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5546
16 clang                0x000000010a0f523a
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 602
17 clang                0x000000010a1323e4 clang::ParseAST(clang::Sema&, bool,
bool) + 516
18 clang                0x000000010a0f42b6
clang::CodeGenAction::ExecuteAction() + 534
19 clang                0x0000000109ee5ed7 clang::FrontendAction::Execute() +
119
20 clang                0x0000000109ec29bd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 957
21 clang                0x0000000109e9429a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3690
22 clang                0x0000000109e8b620 cc1_main(char const**, char const**,
char const*, void*) + 816
23 clang                0x0000000109e916b9 main + 6937
24 libdyld.dylib        0x00007fff917537e1 start + 0
Stack dump:
0.    Program arguments: /opt/local/libexec/llvm-3.3/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -disable-free -main-file-name gmmsearch.c
-mrelocation-model pic -pic-level 2 -masm-verbose -munwind-tables -target-cpu
corei7-avx -target-feature +avx -target-linker-version 134.9 -coverage-file
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_atlas/atlas/work/atlas-3.10.1/build/tune/blas/gemm/gmmsearch.o
-resource-dir /opt/local/libexec/llvm-3.3/bin/../lib/clang/3.3 -D
L2SIZE=4194304 -D Add_ -D F77_INTEGER=int -D StringSunStyle -D ATL_OS_OSX -D
ATL_ARCH_Corei2 -D ATL_CPUMHZ=2300 -D ATL_AVX -D ATL_SSE3 -D ATL_SSE2 -D
ATL_SSE1 -D ATL_USE64BITS -D ATL_GAS_x8664 -D ATL_DYLIBS -D PentiumCPS=2300 -D
ATL_FULL_LAPACK -D ATL_NCPU=4 -I
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_atlas/atlas/work/atlas-3.10.1/build/include
-I
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_atlas/atlas/work/atlas-3.10.1/build/..//include
-I
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_atlas/atlas/work/atlas-3.10.1/build/..//include/contrib
-I/opt/local/include -O3 -fdebug-compilation-dir
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_atlas/atlas/work/atlas-3.10.1/build/tune/blas/gemm
-ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fencode-extended-block-signature
-fdiagnostics-show-option -backend-option -vectorize-loops -backend-option
-vectorize-slp -o gmmsearch.o -x c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_atlas/atlas/work/atlas-3.10.1/build/..//tune/blas/gemm/gmmsearch.c 
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module
'/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_atlas/atlas/work/atlas-3.10.1/build/..//tune/blas/gemm/gmmsearch.c'.
4.    Running pass 'SLP Vectorizer' on function '@GetMuNus'
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 179938)
Target: x86_64-apple-darwin12.3.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/gmmsearch-kavQsv.c
clang: note: diagnostic msg: /tmp/gmmsearch-kavQsv.sh
clang: note: diagnostic msg: 

********************</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>