summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenRegisters.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-01-31 17:56:23 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-01-31 17:56:23 +0000
commitf79c5e2f842e952d26a2aa380fa71d5917c865a0 (patch)
treee67d0b12c75ea506069b76bf67f584d759efbafa /utils/TableGen/CodeGenRegisters.cpp
parentb11917c1aa7348a67d80149fa9613f09a8d56f14 (diff)
downloadllvm-f79c5e2f842e952d26a2aa380fa71d5917c865a0.tar.gz
llvm-f79c5e2f842e952d26a2aa380fa71d5917c865a0.tar.bz2
llvm-f79c5e2f842e952d26a2aa380fa71d5917c865a0.tar.xz
Clarify intent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenRegisters.cpp')
-rw-r--r--utils/TableGen/CodeGenRegisters.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenRegisters.cpp b/utils/TableGen/CodeGenRegisters.cpp
index e902ce031f..4238340ff0 100644
--- a/utils/TableGen/CodeGenRegisters.cpp
+++ b/utils/TableGen/CodeGenRegisters.cpp
@@ -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;