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 769 - Subregister support
Summary: Subregister support
Status: RESOLVED DUPLICATE of bug 1350
Alias: None
Product: libraries
Classification: Unclassified
Component: Common Code Generator Code (show other bugs)
Version: 1.0
Hardware: All All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords: new-feature
Depends on:
Blocks:
 
Reported: 2006-05-04 13:15 PDT by Nate Begeman
Modified: 2007-09-26 01:14 PDT (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Begeman 2006-05-04 13:15:32 PDT
This bug is to cover the work necessary in tablegen and the common code generator to support 
subregisters.  This will intially be used by PowerPC for condition registers, but will be extended to be 
used by x86 for 8 and 16 bit (and 32 bit?) subregs.

An pseudocode example of this will basically look like:

virtual reg 1024, 1025 = CRField register class
virtual reg 1026           = CRBits   register class

1024 = seteq X, Y
1025 = seteq W, Z
1026 = crand 1024.subreg(EQ), 1025.subreg(EQ)
br_cc 1026, mbb5

where EQ will be the subreg number of the "EQ" field in the CRField register class.
Comment 1 Chris Lattner 2006-05-04 13:59:19 PDT
This will also be extremely valuable for SPARC, which will let us get rid of the ugly FPMover.cpp hack.

Basically in the case of SPARC V8, there is no "copy double precision FP value", you have to do it as 2 
copies of floats.

I would like to be able to codegen copy as:

Dest.subreg(LO) = COPYFLOAT  SRC.subreg(LO)
Dest.subreg(HI) = COPYFLOAT  SRC.subreg(HI)

In the instruction selector, then have everything happen.

Actually, this brings up an interesting point: we will probably have to do something special to handle 
SSA and subreg definitions.  In the example above, "Dest" is defined twice! :(

-Chris
Comment 2 Chris Lattner 2007-09-26 01:14:02 PDT

*** This bug has been marked as a duplicate of bug 1350 ***