[LLVMbugs] [Bug 15876] New: Assertion `i == DstIdx || !MI->getOperand(i).isReg() || MI->getOperand(i).getReg() != RegA' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 30 18:13:17 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15876

            Bug ID: 15876
           Summary: Assertion `i == DstIdx || !MI->getOperand(i).isReg()
                    || MI->getOperand(i).getReg() != RegA' failed
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: clang at martinien.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130501/a3ee9019/attachment.html>


More information about the llvm-bugs mailing list