PATCH: TableGen: Report an error when defining more than 32 subreg indices

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Jan 31 09:30:48 PST 2013


On Jan 31, 2013, at 6:23 AM, Tom Stellard <tom at stellard.net> wrote:

> The maximum number of sub reg indices is limited to 32 by use of the
> LaneMask.  TableGen currently assigns all sub reg indices after the
> first 32 to the same LaneMask, which leads to bugs in the register
> allocator.  This patch prevents the user from defining more than 32
> sub reg indices.

Hi Tom,

That behavior is deliberate. It allows graceful degradation for crazy targets with more than 32 vector lanes by sharing the last available bit in the lane mask.

This only means that the coalescer can't do subtle sub-register joins beyond the 32nd lane, causing a few more copies in very exotic code. I prefer that to refusing to build the target.

What are the register allocator bugs you found?

/jakob




More information about the llvm-commits mailing list