diff options
author | OCHyams <orlando.hyams@sony.com> | 2023-02-10 09:27:37 +0000 |
---|---|---|
committer | OCHyams <orlando.hyams@sony.com> | 2023-02-10 09:57:05 +0000 |
commit | 4ad8f7a189570dc2560d0efdd05e6a8153313808 (patch) | |
tree | 5c3f8b75735f2afa0ebf7d784aa6872f1c093f3b /llvm | |
parent | bb059e85d61b48cff4334b33f63eb5680c3c8d50 (diff) | |
download | llvm-4ad8f7a189570dc2560d0efdd05e6a8153313808.zip llvm-4ad8f7a189570dc2560d0efdd05e6a8153313808.tar.gz llvm-4ad8f7a189570dc2560d0efdd05e6a8153313808.tar.bz2 |
[Assignment Tracking][mem2reg] Remove overly defensive assert
The assert fires if a store to an alloca with no linked dbg.assigns has linked
dbg.assigns. This can happen in the wild due to optimisations dropping the
alloca's debug info so we shouldn't assert against it.
Reviewed By: jryans
Differential Revision: https://reviews.llvm.org/D143153
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 75ea9dc..a90ae77 100644 --- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -121,10 +121,8 @@ public: void updateForDeletedStore(StoreInst *ToDelete, DIBuilder &DIB) const { // There's nothing to do if the alloca doesn't have any variables using // assignment tracking. - if (DbgAssigns.empty()) { - assert(at::getAssignmentMarkers(ToDelete).empty()); + if (DbgAssigns.empty()) return; - } // Just leave dbg.assign intrinsics in place and remember that we've seen // one for each variable fragment. |