<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 --- - NaryReassociate: Assertion `New->getType() == getType("
   href="https://llvm.org/bugs/show_bug.cgi?id=25231">25231</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>NaryReassociate:  Assertion `New->getType() == getType(
          </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>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>Backend: PTX
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tobias@grosser.es
          </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=15090" name="attach_15090" title="Test case to reproduce bug">attachment 15090</a> <a href="attachment.cgi?id=15090&action=edit" title="Test case to reproduce bug">[details]</a></span>
Test case to reproduce bug

With 250018 the attached input code crashes for me llc with the following
backtrace:

llc: /home/grosser/Projects/polly/git/lib/IR/Value.cpp:356: void
llvm::Value::replaceAllUsesWith(llvm::Value *): Assertion `New->getType() ==
getType() && "replaceAllUses of value with new value of different type!"'
failed.
#0 0x7f835e5f8d8a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMSupport.so.3.8+0xc1d8a)
#1 0x7f835e5f83f6 llvm::sys::RunSignalHandlers()
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMSupport.so.3.8+0xc13f6)
#2 0x7f835e5fa63a SignalHandler(int)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMSupport.so.3.8+0xc363a)
#3 0x7f835d7672f0 (/lib/x86_64-linux-gnu/libc.so.6+0x352f0)
#4 0x7f835d767267 gsignal
/build/buildd/glibc-2.21/signal/../sysdeps/unix/sysv/linux/raise.c:55:0
#5 0x7f835d768eca abort /build/buildd/glibc-2.21/stdlib/abort.c:91:0
#6 0x7f835d76003d __assert_fail_base
/build/buildd/glibc-2.21/assert/assert.c:92:0
#7 0x7f835d7600f2 (/lib/x86_64-linux-gnu/libc.so.6+0x2e0f2)
#8 0x7f835f96b609 llvm::Value::replaceAllUsesWith(llvm::Value*)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMCore.so.3.8+0x1e6609)
#9 0x7f835ed865dd (anonymous
namespace)::NaryReassociate::runOnFunction(llvm::Function&)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMScalarOpts.so.3.8+0xe35dd)
#10 0x7f835f93d208 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMCore.so.3.8+0x1b8208)
#11 0x7f835f93d44b llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMCore.so.3.8+0x1b844b)
#12 0x7f835f93d905 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMCore.so.3.8+0x1b8905)
#13 0x40c54f main (/home/grosser/Projects/polly/cmake_opt/bin/llc+0x40c54f)
#14 0x7f835d752a40 __libc_start_main
/build/buildd/glibc-2.21/csu/libc-start.c:323:0
#15 0x408ec9 _start (/home/grosser/Projects/polly/cmake_opt/bin/llc+0x408ec9)
Stack dump:
0.    Program arguments: /home/grosser/Projects/polly/cmake_opt/bin/llc
bugpoint-reduced-simplified.bc 
1.    Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.bc'.
2.    Running pass 'Nary reassociation' on function
'@kernel_doitgen_ptx_subfn_0'
Aborted (core dumped)
$~/Projects/polly/cmake_opt/bin/llc bugpoint-reduced-simplified.bc ^C
$mv bugpoint-reduced-simplified.bc /tmp/bug.bc</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>