<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 --- - giving clang -mllvm -regalloc=pbqp as a flag crashes llvm"
   href="http://llvm.org/bugs/show_bug.cgi?id=16019">16019</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>giving clang -mllvm -regalloc=pbqp  as a flag crashes  llvm
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.2
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>carter.schonwald@gmail.com
          </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=10518" name="attach_10518" title="post preprocessor c code">attachment 10518</a> <a href="attachment.cgi?id=10518&action=edit" title="post preprocessor c code">[details]</a></span>
post preprocessor c code

runnning 
 clang -c simplemat.c   -march=corei7  -msse4.2  -O3  -v -S -mllvm
-regalloc=pbqp 

causes a crash with the following output

lang -c simplemat.c   -march=corei7  -msse4.2  -O3  -v -S -mllvm -regalloc=pbqp
-v
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-apple-darwin12.3.0
Thread model: posix
 "/usr/local/Cellar/llvm/3.2/bin/clang" -cc1 -triple x86_64-apple-macosx10.8.0
-S -disable-free -main-file-name simplemat.c -mrelocation-model pic -pic-level
2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu corei7
-target-feature +sse4.2 -target-linker-version 134.9 -v -v -coverage-file
/Users/carter/Dropbox/projects/active/WellPosedWork/code/numerics/cbits/simplemat.s
-resource-dir /usr/local/Cellar/llvm/3.2/bin/../lib/clang/3.2
-fmodule-cache-path
/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/clang-module-cache -O3
-fdebug-compilation-dir
/Users/carter/Projects/active/WellPosedWork/code/numerics/cbits -ferror-limit
19 -fmessage-length 122 -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 -fcolor-diagnostics -mllvm -regalloc=pbqp -o
simplemat.s -x c simplemat.c
clang -cc1 version 3.2 based upon LLVM 3.2svn default target
x86_64-apple-darwin12.3.0
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/Cellar/llvm/3.2/bin/../lib/clang/3.2/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
simplemat.c:120:88: warning: backslash and newline separated by space
[-Wbackslash-newline-escape]
    __m128d  resRowRightResultA##ix = _mm_dp_pd(lMatRowLeft##ix , rMatCol3Up,
0x31) ; \ 
                                                                               
       ^
simplemat.c:122:51: warning: backslash and newline separated by space
[-Wbackslash-newline-escape]
    resRowRight##ix +=  resRowRightResultA##ix ; \ 
                                                  ^
simplemat.c:124:79: warning: backslash and newline separated by space
[-Wbackslash-newline-escape]
    resRowRightResultA##ix = _mm_dp_pd(lMatRowLeft##ix , rMatCol4Up, 0x32) ; \ 
                                                                              ^
0  libLLVM-3.2svn.dylib 0x000000010910738b PrintStackTrace(void*) + 34
1  libLLVM-3.2svn.dylib 0x000000010910771d SignalHandler(int) + 228
2  libsystem_c.dylib    0x00007fff8527594a _sigtramp + 26
3  libsystem_c.dylib    0x0000000109bd1a00 _sigtramp + 18446603342740570320
4  libLLVM-3.2svn.dylib 0x0000000108c3bc5f
PBQP::HeuristicSolverImpl<PBQP::Heuristics::Briggs>::disconnectTrivialNodes() +
203
5  libLLVM-3.2svn.dylib 0x0000000108c39452
PBQP::HeuristicSolverImpl<PBQP::Heuristics::Briggs>::setup() + 28
6  libLLVM-3.2svn.dylib 0x0000000108c39216
PBQP::HeuristicSolverImpl<PBQP::Heuristics::Briggs>::computeSolution() + 24
7  libLLVM-3.2svn.dylib 0x0000000108c39187
PBQP::HeuristicSolver<PBQP::Heuristics::Briggs>::solve(PBQP::Graph&) + 235
8  libLLVM-3.2svn.dylib 0x0000000108c372b8 (anonymous
namespace)::RegAllocPBQP::runOnMachineFunction(llvm::MachineFunction&) + 1576
9  libLLVM-3.2svn.dylib 0x0000000108be967a
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 48
10 libLLVM-3.2svn.dylib 0x0000000108d1c3e7
llvm::FPPassManager::runOnFunction(llvm::Function&) + 295
11 libLLVM-3.2svn.dylib 0x0000000108d1c58b
llvm::FPPassManager::runOnModule(llvm::Module&) + 63
12 libLLVM-3.2svn.dylib 0x0000000108d1c6c1
llvm::MPPassManager::runOnModule(llvm::Module&) + 255
13 libLLVM-3.2svn.dylib 0x0000000108d1ca04
llvm::PassManagerImpl::run(llvm::Module&) + 104
14 libLLVM-3.2svn.dylib 0x0000000108d1cb1d
llvm::PassManager::run(llvm::Module&) + 13
15 clang                0x0000000107e3f944
std::vector<clang::serialization::ModuleFile*,
std::allocator<clang::serialization::ModuleFile*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::serialization::ModuleFile**,</span >
std::vector<clang::serialization::ModuleFile*,
std::allocator<clang::serialization::ModuleFile*> > >,
clang::serialization::ModuleFile* const&) + 6844
16 clang                0x0000000107efc6d7 llvm::ParseIR(llvm::MemoryBuffer*,
llvm::SMDiagnostic&, llvm::LLVMContext&) + 1575
17 clang                0x0000000107f2baf1
clang::operator==(clang::specific_attr_iterator<clang::MBlazeInterruptHandlerAttr,
llvm::SmallVector<clang::Attr*, 2u> >,
clang::specific_attr_iterator<clang::MBlazeInterruptHandlerAttr,
llvm::SmallVector<clang::Attr*, 2u> >) + 962
18 clang                0x0000000107efbd49 std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,</span >
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 9299
19 clang                0x0000000107d66522
std::_Rb_tree<clang::edit::FileOffset, std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit>,
std::_Select1st<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >, std::less<clang::edit::FileOffset>,
std::allocator<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >
<span class="quote">>::_M_erase(std::_Rb_tree_node<std::pair<clang::edit::FileOffset const,</span >
clang::edit::EditedSource::FileEdit> >*) + 3902
20 clang                0x0000000107d4dc0a
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**,</span >
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
<span class="quote">> >, clang::CompilerInstance* const&) + 11528</span >
21 clang                0x0000000107d24d5e std::_Rb_tree<std::string,
std::string, std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert(std::_Rb_tree_node_base*,
std::_Rb_tree_node_base*, std::string const&) + 3628
22 clang                0x0000000107d1ea60
23 clang                0x0000000107d220b8 std::vector<std::string,
std::allocator<std::string>
<span class="quote">>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*,</span >
std::vector<std::string, std::allocator<std::string> > >, std::string const&) +
1192
24 libdyld.dylib        0x00007fff8699e7e1 start + 0
Stack dump:
0.    Program arguments: /usr/local/Cellar/llvm/3.2/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -S -disable-free -main-file-name simplemat.c
-mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu corei7 -target-feature +sse4.2
-target-linker-version 134.9 -v -v -coverage-file
/Users/carter/Dropbox/projects/active/WellPosedWork/code/numerics/cbits/simplemat.s
-resource-dir /usr/local/Cellar/llvm/3.2/bin/../lib/clang/3.2
-fmodule-cache-path
/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/clang-module-cache -O3
-fdebug-compilation-dir
/Users/carter/Projects/active/WellPosedWork/code/numerics/cbits -ferror-limit
19 -fmessage-length 122 -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 -fcolor-diagnostics -mllvm -regalloc=pbqp -o
simplemat.s -x c simplemat.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'simplemat.c'.
4.    Running pass 'PBQP Register Allocator' on function '@fatDotProduct'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (tags/RELEASE_32/final)
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:
/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/simplemat-1Q8934.c
clang: note: diagnostic msg:
/var/folders/py/wgp_hj9d2rl3cx48yym_ynj00000gn/T/simplemat-1Q8934.sh
clang: note: diagnostic msg: 



the associated run script is 

/usr/local/Cellar/llvm/3.2/bin/clang -cc1 -triple x86_64-apple-macosx10.8.0 -S
-disable-free -main-file-name simplemat.c -mrelocation-model pic -pic-level 2
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu corei7
-target-feature +sse4.2 -target-linker-version 134.9 -v -v -O3 -ferror-limit 19
-fmessage-length 122 -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 -fcolor-diagnostics -mllvm -regalloc=pbqp -x c
simplemat-1Q8934.c</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>