diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index 318776136e2..1c192815ab9 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -23,6 +23,7 @@  // the verifier errors.  //===----------------------------------------------------------------------===// +#include "LiveRangeCalc.h"  #include "llvm/ADT/BitVector.h"  #include "llvm/ADT/DenseMap.h"  #include "llvm/ADT/DenseSet.h" @@ -2116,6 +2117,13 @@ void MachineVerifier::verifyLiveRangeSegment(const LiveRange &LR,      // Skip this block.      ++MFI;    } + +  SmallVector<SlotIndex, 4> Undefs; +  if (LaneMask.any()) { +    LiveInterval &OwnerLI = LiveInts->getInterval(Reg); +    OwnerLI.computeSubRangeUndefs(Undefs, LaneMask, *MRI, *Indexes); +  } +    while (true) {      assert(LiveInts->isLiveInToMBB(LR, &*MFI));      // We don't know how to track physregs into a landing pad. @@ -2141,7 +2149,9 @@ void MachineVerifier::verifyLiveRangeSegment(const LiveRange &LR,        // instruction with subregister intervals        // only one of the subregisters (not necessarily the current one) needs to        // be defined. -      if (!PVNI && (LaneMask.none() || !IsPHI) ) { +      if (!PVNI && (LaneMask.none() || !IsPHI)) { +        if (LiveRangeCalc::isJointlyDominated(*PI, Undefs, *Indexes)) +          continue;          report("Register not marked live out of predecessor", *PI);          report_context(LR, Reg, LaneMask);          report_context(*VNI);  | 

