<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 --- - Clang trunk ICE (Assertion `Removed && "Register is not used by this instruction!)"
   href="https://llvm.org/bugs/show_bug.cgi?id=28301">28301</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang trunk ICE (Assertion `Removed && "Register is not used by this instruction!)
          </td>
        </tr>

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

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>anton.mitrokhin@phystech.edu
          </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>Created <span class=""><a href="attachment.cgi?id=16633" name="attach_16633" title="Reproducer">attachment 16633</a> <a href="attachment.cgi?id=16633&action=edit" title="Reproducer">[details]</a></span>
Reproducer

Reproduce:
<span class="quote">> clang++ -std=c++11 -O3 -o out.o -c crash.cpp</span >

Output:
clang-3.9:
/export/users/amitrokh/llvm/llvm-trunk/include/llvm/CodeGen/LiveVariables.h:226:
bool llvm::LiveVariables::removeVirtualRegisterKilled(unsigned int,
llvm::MachineInstr*): Assertion `Removed && "Register is not used by this
instruction!"' failed.
#0 0x0000000001110535 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1110535)
#1 0x000000000110e1e6 llvm::sys::RunSignalHandlers()
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x110e1e6)
#2 0x000000000110e411 SignalHandler(int)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x110e411)
#3 0x00007f51216b6100 __restore_rt (/lib64/libpthread.so.0+0xf100)
#4 0x00007f51202ae5f7 __GI_raise (/lib64/libc.so.6+0x355f7)
#5 0x00007f51202afce8 __GI_abort (/lib64/libc.so.6+0x36ce8)
#6 0x00007f51202a7566 __assert_fail_base (/lib64/libc.so.6+0x2e566)
#7 0x00007f51202a7612 (/lib64/libc.so.6+0x2e612)
#8 0x0000000000b5c25f llvm::LiveVariables::removeVirtualRegisterKilled(unsigned
int, llvm::MachineInstr*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xb5c25f)
#9 0x0000000000be659a (anonymous
namespace)::TwoAddressInstructionPass::rescheduleMIBelowKill(llvm::MachineInstrBundleIterator<llvm::MachineInstr>&,
llvm::MachineInstrBundleIterator<llvm::MachineInstr>&, unsigned int)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xbe659a)
#10 0x0000000000be8a7c (anonymous
namespace)::TwoAddressInstructionPass::tryInstructionTransform(llvm::MachineInstrBundleIterator<llvm::MachineInstr>&,
llvm::MachineInstrBundleIterator<llvm::MachineInstr>&, unsigned int, unsigned
int, unsigned int, bool)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xbe8a7c)
#11 0x0000000000bec84f (anonymous
namespace)::TwoAddressInstructionPass::runOnMachineFunction(llvm::MachineFunction&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xbec84f)
#12 0x0000000000af3294
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xaf3294)
#13 0x0000000000d8d633 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xd8d633)
#14 0x0000000000d8d9eb llvm::FPPassManager::runOnModule(llvm::Module&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xd8d9eb)
#15 0x0000000000d8dcff llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0xd8dcff)
#16 0x0000000001266b92 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1266b92)
#17 0x000000000187b026
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x187b026)
#18 0x0000000001c95e3b clang::ParseAST(clang::Sema&, bool, bool)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1c95e3b)
#19 0x000000000187b3db clang::CodeGenAction::ExecuteAction()
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x187b3db)
#20 0x0000000001592766 clang::FrontendAction::Execute()
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x1592766)
#21 0x000000000156c71e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x156c71e)
#22 0x00000000016271cc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x16271cc)
#23 0x0000000000706718 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x706718)
#24 0x00000000006d9f7f main
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x6d9f7f)
#25 0x00007f512029ab15 __libc_start_main (/lib64/libc.so.6+0x21b15)
#26 0x00000000007027b5 _start
(/export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9+0x7027b5)
Stack dump:
0.      Program arguments: /export/users/amitrokh/llvm/bin-trunk/bin/clang-3.9
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
crash.cpp -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info
-debugger-tuning=gdb -coverage-file
/export/users/amitrokh/forCreduce/untracked/clang_register_nu/out.o
-resource-dir /export/users/amitrokh/llvm/bin-trunk/bin/../lib/clang/3.9.0
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/x86_64-redhat-linux
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../include/c++/4.8.5/backward
-internal-isystem /usr/local/include -internal-isystem
/export/users/amitrokh/llvm/bin-trunk/bin/../lib/clang/3.9.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/export/users/amitrokh/forCreduce/untracked/clang_register_nu -ferror-limit 19
-fmessage-length 237 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o out.o -x c++ crash.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'crash.cpp'.
4.      Running pass 'Two-Address instruction pass' on function '@_Z3fn1v'



<span class="quote">> clang -v</span >
clang version 3.9.0 (trunk 273570)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /export/users/amitrokh/llvm/bin-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/4.8.5
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64</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>