aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/ValueTrackingTest.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2021-09-21 16:54:47 +0100
committerFlorian Hahn <flo@fhahn.com>2021-09-21 16:54:47 +0100
commit5131037ea96f9e2bc863557ba6d6dc63f46a94ab (patch)
tree096bc75a71e16597c83a180fe92fecca7633b3d2 /llvm/unittests/Analysis/ValueTrackingTest.cpp
parent5fb3ae525ffa7fc9e09e0c10de02ecc003c3adae (diff)
downloadllvm-5131037ea96f9e2bc863557ba6d6dc63f46a94ab.zip
llvm-5131037ea96f9e2bc863557ba6d6dc63f46a94ab.tar.gz
llvm-5131037ea96f9e2bc863557ba6d6dc63f46a94ab.tar.bz2
[ValueTracking,VectorCombine] Allow passing DT to computeConstantRange.
isValidAssumeForContext can provide better results with access to the dominator tree in some cases. This patch adjusts computeConstantRange to allow passing through a dominator tree. The use VectorCombine is updated to pass through the DT to enable additional scalarization. Note that similar APIs like computeKnownBits already accept optional dominator tree arguments. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D110175
Diffstat (limited to 'llvm/unittests/Analysis/ValueTrackingTest.cpp')
-rw-r--r--llvm/unittests/Analysis/ValueTrackingTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 4c4067e..a1dedd8 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -2103,7 +2103,7 @@ TEST_F(ValueTrackingTest, ComputeConstantRange) {
// Check the depth cutoff results in a conservative result (full set) by
// passing Depth == MaxDepth == 6.
- ConstantRange CR3 = computeConstantRange(X2, true, &AC, I, 6);
+ ConstantRange CR3 = computeConstantRange(X2, true, &AC, I, nullptr, 6);
EXPECT_TRUE(CR3.isFullSet());
}
{