[llvm] 9cfc7ff - [LiveRange] Verify Other LiveRange in Join API (#66809)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 10:58:21 PDT 2023


Author: annamthomas
Date: 2023-09-20T13:58:16-04:00
New Revision: 9cfc7ff16872de33d6efe0a43d3ac241c6683992

URL: https://github.com/llvm/llvm-project/commit/9cfc7ff16872de33d6efe0a43d3ac241c6683992
DIFF: https://github.com/llvm/llvm-project/commit/9cfc7ff16872de33d6efe0a43d3ac241c6683992.diff

LOG: [LiveRange] Verify Other LiveRange in Join API (#66809)

The LiveRange::join API takes in two live ranges. We should verify the
LiveRange passed in to the Join API as well.

Added: 
    

Modified: 
    llvm/lib/CodeGen/LiveInterval.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 1cf354349c5610c..a8e45d46c07cee6 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -629,6 +629,7 @@ void LiveRange::join(LiveRange &Other,
                      const int *RHSValNoAssignments,
                      SmallVectorImpl<VNInfo *> &NewVNInfo) {
   verify();
+  Other.verify();
 
   // Determine if any of our values are mapped.  This is uncommon, so we want
   // to avoid the range scan if not.


        


More information about the llvm-commits mailing list