[llvm] 702062f - [NFC][DSE][DebugInfo] Say what an empty fragment intersect means (#216123)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 15:53:40 PDT 2026


Author: Eric Christopher
Date: 2026-08-13T15:53:36-07:00
New Revision: 702062fafee9d0ce377c547d6ae575b5efa0533f

URL: https://github.com/llvm/llvm-project/commit/702062fafee9d0ce377c547d6ae575b5efa0533f
DIFF: https://github.com/llvm/llvm-project/commit/702062fafee9d0ce377c547d6ae575b5efa0533f.diff

LOG: [NFC][DSE][DebugInfo] Say what an empty fragment intersect means (#216123)

calculateFragmentIntersect leaves NewFragment empty when the intersect
covers
everything the record describes, which is an answer rather than a
failure. The
comment here only described the failure, so the case where the dead
slice
covers the whole thing read as something having gone wrong.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 110a3c20654ac..3e9857c1947e7 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -560,8 +560,10 @@ static void shortenAssignment(Instruction *Inst, Value *OriginalDest,
                                         DeadSliceSizeInBits, Assign,
                                         NewFragment) ||
         !NewFragment) {
-      // We couldn't calculate the intersecting fragment for some reason. Be
-      // cautious and unlink the whole assignment from the store.
+      // Either the intersection couldn't be worked out, or it covers the
+      // entire variable region described by the record. Full coverage leaves
+      // NewFragment empty rather than making calculateFragmentIntersect fail,
+      // so unlink the whole assignment from the store in both cases.
       Assign->setKillAddress();
       Assign->setAssignId(GetDeadLink());
       continue;


        


More information about the llvm-commits mailing list