LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 4668 - "Ran out of registers during register allocation" on x86-32 with asm using only 6 registers
Summary: "Ran out of registers during register allocation" on x86-32 with asm using on...
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-01 20:24 PDT by Eli Friedman
Modified: 2011-05-06 15:57 PDT (History)
7 users (show)

See Also:
Fixed By Commit(s):


Attachments
Reduced testcase (776 bytes, application/octet-stream)
2009-08-01 20:24 PDT, Eli Friedman
Details
Re-reduced testcase (5.09 KB, application/octet-stream)
2009-08-06 23:17 PDT, Eli Friedman
Details
Re-re-reduced testcase (2.68 KB, application/octet-stream)
2010-08-30 20:54 PDT, Eli Friedman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eli Friedman 2009-08-01 20:24:59 PDT
Created attachment 3272 [details]
Reduced testcase

Per summary, incorrect error; to reproduce, run llc (with no special arguments) over attached.  Seems to work with "-regalloc=local".

Testcase reduced from ffmpeg (the source of all fun inline asm issues).
Comment 1 Dale Johannesen 2009-08-06 19:04:52 PDT
This works for me (not my doing).  I've put the example in the testsuite to keep it from regressing; this is a fragile area.

Comment 2 Eli Friedman 2009-08-06 23:17:24 PDT
The original is still breaking; I'll attach it in a moment.
Comment 3 Eli Friedman 2009-08-06 23:17:59 PDT
Created attachment 3295 [details]
Re-reduced testcase
Comment 4 Dale Johannesen 2009-08-07 16:17:01 PDT
It seems to think the EDX result from the first asm, which is never used, is still live across the second asm.

Comment 5 Evan Cheng 2010-03-09 19:29:33 PST
The reduced test case is going to fail with machine cse. The fundamental problem is we can't spill a register once it's fixed to a physical register.
Comment 6 Eli Friedman 2010-07-31 00:28:23 PDT
This is still affecting ffmpeg... is it on someone's todo list?
Comment 7 Jakob Stoklund Olesen 2010-08-30 20:28:45 PDT
Does the problem persist with -disable-physical-join?
Comment 8 Eli Friedman 2010-08-30 20:54:46 PDT
Created attachment 5430 [details]
Re-re-reduced testcase

These bugpoint-reduced testcases have a tendency to get out-of-date...
Comment 9 Eli Friedman 2010-08-30 21:01:50 PDT
And yes, -disable-physical-join fixes the issue.
Comment 10 İsmail Dönmez 2010-12-21 15:19:37 PST
Still reproducable on trunk.
Comment 11 Jakob Stoklund Olesen 2011-05-06 15:57:01 PDT
This is likely to have been fixed by disabling physical register coalescing, but I can no longer make the test case fail.
Please verify with trunk.