<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - [GlobalISel] Assertion failure in IRTranslator when translating ExtractValue"
   href="https://bugs.llvm.org/show_bug.cgi?id=37984">37984</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[GlobalISel] Assertion failure in IRTranslator when translating ExtractValue
          </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>GlobalISel
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tstellar@redhat.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20493" name="attach_20493" title="Reduced test case">attachment 20493</a> <a href="attachment.cgi?id=20493&action=edit" title="Reduced test case">[details]</a></span>
Reduced test case

The attached test case triggers an assertion failure when using GlobalIsel:


$ ./llc -global-isel < gisel-crash.ll 
        .text
        .file   "<stdin>"
llc: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:141:
IRTranslator::ValueToVRegInfo::VRegListT
&llvm::IRTranslator::allocateVRegs(const llvm::Value &): Assertion
`!VMap.contains(Val) && "Value already allocated in VMap"' failed.
Stack dump:
0.      Program arguments: ./llc -global-isel 
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
llvm-build/bin/../lib/libLLVM-7svn.so(+0x929f14)[0x7fc0fe4d9f14]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7fc0fe4d8210]
llvm-build/bin/../lib/libLLVM-7svn.so(+0x92a0c2)[0x7fc0fe4da0c2]
/lib64/libpthread.so.0(+0xf370)[0x7fc0fd9a3370]
/lib64/libc.so.6(gsignal+0x37)[0x7fc0fcde81d7]
/lib64/libc.so.6(abort+0x148)[0x7fc0fcde98c8]
/lib64/libc.so.6(+0x2e146)[0x7fc0fcde1146]
/lib64/libc.so.6(+0x2e1f2)[0x7fc0fcde11f2]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm12IRTranslator13allocateVRegsERKNS_5ValueE+0x2ba)[0x7fc0fec73c0a]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm12IRTranslator21translateExtractValueERKNS_4UserERNS_16MachineIRBuilderE+0x14f)[0x7fc0fec776bf]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm12IRTranslator9translateERKNS_11InstructionE+0x318)[0x7fc0fec7d878]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm12IRTranslator20runOnMachineFunctionERNS_15MachineFunctionE+0xb28)[0x7fc0fec7ea68]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0xb4)[0x7fc0fe7dffc4]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x257)[0x7fc0fe6084b7]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x7fc0fe608713]
llvm-build/bin/../lib/libLLVM-7svn.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x37b)[0x7fc0fe608c1b]</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>