Consider attached bytecode. LLC results with: ./llc bugpoint-reduced-simplified.bc llc: /home/asl/proj/llvm/src/lib/CodeGen/LiveInterval.cpp:189: llvm::LiveRange* llvm::LiveInterval::addRangeFrom(llvm::LiveRange, llvm::LiveRange*): Assertion `B->end <= Start && "Cannot overlap two LiveRanges with differing ValID's" " (did you def the same reg twice in a MachineInstr?)"' failed. ./llc((anonymous namespace)::PrintStackTrace()+0x1f)[0x863177f] /lib/libc.so.6(abort+0xe9)[0xb7d25229] /lib/libc.so.6(__assert_fail+0xeb)[0xb7d1d4e3] ./llc(llvm::LiveInterval::addRangeFrom(llvm::LiveRange, llvm::LiveRange*)+0x1ee)[0x84e4a0e] I don't see anything wrong with the inline assembler itself.
Created attachment 706 [details] Failed bytecode.
Just for information. This is reduction from "test.cpp" found in the http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-March/008196.html
here is a reduced testcase: define void @test() { %tmp2 = call i32 asm "...", "=r,~{dirflag},~{fpsr},~{flags},~{dx},~{cx},~{ax}"( ) unreachable } Here, the isel assigns the result reg to EAX, which creates this invalid MI: INLINEASM <es:...>, 10, %EAX<def>, 10, %DX<def>, 10, %CX<def>, 10, %AX<def> The assert is exactly right: LiveInterval.cpp:189: failed assertion ..." (did you def the same reg twice in a MachineInstr?)"' -Chris
Looks like this has been already been fixed.