summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-07-16 18:55:35 +0000
committerMatthias Braun <matze@braunis.de>2015-07-16 18:55:35 +0000
commit0d4cebd434c6aa95a5fd089e6feee126493e416f (patch)
treeea6f0b935a3c1f2d3026b2f53ebededaa2ee4225 /llvm/lib/CodeGen/MachineVerifier.cpp
parent7f5ae19e803d3a2faba71b17cde925a43a602a33 (diff)
downloadbcm5719-llvm-0d4cebd434c6aa95a5fd089e6feee126493e416f.tar.gz
bcm5719-llvm-0d4cebd434c6aa95a5fd089e6feee126493e416f.zip
LiveInterval: Document and enforce rules about empty subranges.
Empty subranges are not allowed in a LiveInterval and must be removed instead: Check this in the verifiers, put a reminder for this in the comment of the shrinkToUses variant for a single lane and make it automatic for the shrinkToUses variant for a LiveInterval. llvm-svn: 242431
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index ca35ec5fdcf..a5e5bc992ef 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1671,6 +1671,8 @@ void MachineVerifier::verifyLiveInterval(const LiveInterval &LI) {
report("Lane masks of sub ranges overlap in live interval", MF, LI);
if ((SR.LaneMask & ~MaxMask) != 0)
report("Subrange lanemask is invalid", MF, LI);
+ if (SR.empty())
+ report("Subrange must not be empty", MF, SR, LI.reg, SR.LaneMask);
Mask |= SR.LaneMask;
verifyLiveRange(SR, LI.reg, SR.LaneMask);
if (!LI.covers(SR))
OpenPOWER on IntegriCloud