Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveVars assertion handling inline assembler. #1631

Closed
asl opened this issue Mar 18, 2007 · 3 comments
Closed

LiveVars assertion handling inline assembler. #1631

asl opened this issue Mar 18, 2007 · 3 comments
Labels
backend:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead

Comments

@asl
Copy link
Collaborator

asl commented Mar 18, 2007

Bugzilla Link 1259
Resolution FIXED
Resolved on Feb 22, 2010 12:46
Version trunk
OS Linux
Attachments Failed bytecode.

Extended Description

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.

@asl
Copy link
Collaborator Author

asl commented Mar 18, 2007

Just for information. This is reduction from "test.cpp" found in the
http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-March/008196.html

@lattner
Copy link
Collaborator

lattner commented Mar 19, 2007

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, 10, %DX, 10, %CX, 10, %AX

The assert is exactly right:
LiveInterval.cpp:189: failed assertion ..." (did you def the same reg twice in a MachineInstr?)"'

-Chris

@llvmbot
Copy link
Collaborator

llvmbot commented May 22, 2007

Looks like this has been already been fixed.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead
Projects
None yet
Development

No branches or pull requests

3 participants