<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 --- - Assertion `i == DstIdx || !MI->getOperand(i).isReg() || MI->getOperand(i).getReg() != RegA' failed"
   href="http://llvm.org/bugs/show_bug.cgi?id=15876">15876</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `i == DstIdx || !MI->getOperand(i).isReg() || MI->getOperand(i).getReg() != RegA' failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>clang@martinien.de
          </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>Hi,

the following inline asm causes an assert on current trunk/Linux x86-64.
Removing e.g. the "eax" in the destroyed register list makes it work.


void f()
{
    int i = 1, eax;
    __asm__ ("nop"
        : "=a" (eax)
        : "0" (i)
        : "eax" );
}


clang: /local/mar_/llvmtrunk/lib/CodeGen/TwoAddressInstructionPass.cpp:1384:
void <anonymous
namespace>::TwoAddressInstructionPass::processTiedPairs(llvm::MachineInstr *,
TiedPairList &, unsigned int &): Assertion `i == DstIdx ||
!MI->getOperand(i).isReg() || MI->getOperand(i).getReg() != RegA' failed.
0  clang           0x0000000001f34af2 _ZN4llvm3sys15PrintStackTraceEP8_IO_FILE
+ 34
1  clang           0x0000000001f35023
2  libpthread.so.0 0x00002ad848dfe6b0
3  libc.so.6       0x00002ad849bc5945 gsignal + 53
4  libc.so.6       0x00002ad849bc6f21 abort + 385
5  libc.so.6       0x00002ad849bbe810 __assert_fail + 240
6  clang           0x0000000001ab2eeb
7  clang           0x00000000019ebd54
_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE + 116
8  clang           0x0000000001ed3c0c
_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE + 444
9  clang           0x0000000001ed3e0b
_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE + 59
10 clang           0x0000000001ed417e
_ZN4llvm13MPPassManager11runOnModuleERNS_6ModuleE + 494
11 clang           0x0000000001ed4788
_ZN4llvm15PassManagerImpl3runERNS_6ModuleE + 456
12 clang           0x0000000001ed492a _ZN4llvm11PassManager3runERNS_6ModuleE +
10
13 clang           0x00000000008152a7
_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsEPN4llvm6ModuleENS_13BackendActionEPNSB_11raw_ostreamE
+ 6039
14 clang           0x0000000000812dea
15 clang           0x000000000095d9c5 _ZN5clang8ParseASTERNS_4SemaEbb + 549
16 clang           0x0000000000812034 _ZN5clang13CodeGenAction13ExecuteActionEv
+ 196
17 clang           0x000000000069ae27 _ZN5clang14FrontendAction7ExecuteEv + 119
18 clang           0x0000000000679c6d
_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE + 989
19 clang           0x00000000006602a2
_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE + 3778
20 clang           0x0000000000656924 _Z8cc1_mainPPKcS1_S0_Pv + 772
21 clang           0x000000000065d310 main + 7328
22 libc.so.6       0x00002ad849bb1bc6 __libc_start_main + 230
23 clang           0x0000000000656559


1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'm.cpp'.
4.      Running pass 'Two-Address instruction pass' on function '@_Z1fv'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 180834)
Target: x86_64-unknown-linux-gnu
Thread model: posix


Best regards,
Martin</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>