From 0d4cebd434c6aa95a5fd089e6feee126493e416f Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 16 Jul 2015 18:55:35 +0000 Subject: 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 --- llvm/lib/CodeGen/LiveInterval.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/CodeGen/LiveInterval.cpp') diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index d75e4417cb0..3dc4113c639 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -1110,6 +1110,8 @@ void LiveInterval::verify(const MachineRegisterInfo *MRI) const { // subrange mask should not contained in maximum lane mask for the vreg. assert((Mask & ~MaxMask) == 0); + // empty subranges must be removed. + assert(!SR.empty()); SR.verify(); // Main liverange should cover subrange. -- cgit v1.2.3