Clarify intent.

llvm-svn: 174068
This commit is contained in:
Jakob Stoklund Olesen 2013-01-31 17:56:23 +00:00
parent b76ec3bb5e
commit 6b1eda0a6c
1 changed files with 6 additions and 0 deletions

View File

@ -1198,6 +1198,12 @@ void CodeGenRegBank::computeSubRegIndexLaneMasks() {
if (Idx->getComposites().empty()) {
Idx->LaneMask = 1u << Bit;
// Share bit 31 in the unlikely case there are more than 32 leafs.
//
// Sharing bits is harmless; it allows graceful degradation in targets
// with more than 32 vector lanes. They simply get a limited resolution
// view of lanes beyond the 32nd.
//
// See also the comment for getSubRegIndexLaneMask().
if (Bit < 31) ++Bit;
} else {
Idx->LaneMask = 0;