summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/Utils/LocalTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Transforms/Utils/LocalTest.cpp')
-rw-r--r--llvm/unittests/Transforms/Utils/LocalTest.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/unittests/Transforms/Utils/LocalTest.cpp b/llvm/unittests/Transforms/Utils/LocalTest.cpp
index 1f67a1ec84c..99713d5817f 100644
--- a/llvm/unittests/Transforms/Utils/LocalTest.cpp
+++ b/llvm/unittests/Transforms/Utils/LocalTest.cpp
@@ -759,11 +759,14 @@ TEST(Local, ReplaceAllDbgUsesWith) {
auto *ADbgVal = cast<DbgValueInst>(A.getNextNode());
EXPECT_EQ(ConstantInt::get(A.getType(), 0), ADbgVal->getVariableLocation());
- // Introduce a use-before-def. Check that the dbg.values for %f are deleted.
+ // Introduce a use-before-def. Check that the dbg.values for %f become undef.
EXPECT_TRUE(replaceAllDbgUsesWith(F_, G, G, DT));
+ auto *FDbgVal = cast<DbgValueInst>(F_.getNextNode());
+ EXPECT_TRUE(isa<UndefValue>(FDbgVal->getVariableLocation()));
+
SmallVector<DbgValueInst *, 1> FDbgVals;
- findDbgValues(FDbgVals, &F);
+ findDbgValues(FDbgVals, &F_);
EXPECT_EQ(0U, FDbgVals.size());
// Simulate i32 -> i64 conversion to test sign-extension. Here are some
OpenPOWER on IntegriCloud