summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyCFG
diff options
context:
space:
mode:
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2019-12-13 15:53:40 +0100
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>2019-12-16 11:41:21 +0100
commite5f07080b8ac73dd573e81a186925a122ab8a39d (patch)
tree0ce283e337a1a15429e71b5f72e95df47094dd72 /llvm/test/Transforms/SimplifyCFG
parent632deb6bd04022945468faef2dcaa8c9fdf1b0fd (diff)
downloadbcm5719-llvm-e5f07080b8ac73dd573e81a186925a122ab8a39d.tar.gz
bcm5719-llvm-e5f07080b8ac73dd573e81a186925a122ab8a39d.zip
[BasicBlockUtils] Fix dbg.value elimination problem in MergeBlockIntoPredecessor
Summary: In commit d60f34c20a2f31335c8d5626e (llvm-svn 317128, PR35113) MergeBlockIntoPredecessor was changed into discarding some dbg.value intrinsics referring to PHI values, post-splice due to loop rotation. That elimination of dbg.value intrinsics did not consider which dbg.value to keep depending on the context (e.g. if the variable is changing its value several times inside the basic block). In the past that hasn't been such a big problem since CodeGenPrepare::placeDbgValues has moved the dbg.value to be next to the PHI node anyway. But after commit 00e238896cd8ad3a7d7 CodeGenPrepare isn't doing that any longer, so we need to be more careful when avoiding duplicate dbg.value intrinsics in MergeBlockIntoPredecessor. This patch replaces the code that tried to avoid duplicate dbg.values by using the RemoveRedundantDbgInstrs helper. Reviewers: aprantl, jmorse, vsk Reviewed By: aprantl, vsk Subscribers: jholewinski, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71480
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG')
-rw-r--r--llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-inlined.ll1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-inlined.ll b/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-inlined.ll
index ec818416418..968c6fd01f4 100644
--- a/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-inlined.ll
+++ b/llvm/test/Transforms/SimplifyCFG/hoist-dbgvalue-inlined.ll
@@ -8,7 +8,6 @@ init:
; CHECK: %vala = load i64, i64* %ptr
; CHECK-NEXT: call void @llvm.dbg.value(metadata i64 %vala, metadata [[MD:![0-9]*]]
-; CHECK-NEXT: call void @llvm.dbg.value(metadata i64 %vala, metadata [[MD]]
; CHECK-NEXT: %valbmasked = and i64 %vala, 1
a: ; preds = %init
OpenPOWER on IntegriCloud