aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Analysis')
-rw-r--r--llvm/unittests/Analysis/IR2VecTest.cpp6
-rw-r--r--llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt2
-rw-r--r--llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt2
-rw-r--r--llvm/unittests/Analysis/ValueTrackingTest.cpp28
4 files changed, 19 insertions, 19 deletions
diff --git a/llvm/unittests/Analysis/IR2VecTest.cpp b/llvm/unittests/Analysis/IR2VecTest.cpp
index 7c9a546..e288585 100644
--- a/llvm/unittests/Analysis/IR2VecTest.cpp
+++ b/llvm/unittests/Analysis/IR2VecTest.cpp
@@ -364,9 +364,9 @@ TEST_F(IR2VecTestFixture, GetFunctionVector) {
EXPECT_TRUE(FuncVec.approximatelyEquals(Embedding(2, 44.4)));
}
-static constexpr unsigned MaxOpcodes = 67;
-static constexpr unsigned MaxTypeIDs = 21;
-static constexpr unsigned MaxOperands = 4;
+static constexpr unsigned MaxOpcodes = Vocabulary::MaxOpcodes;
+static constexpr unsigned MaxTypeIDs = Vocabulary::MaxTypeIDs;
+static constexpr unsigned MaxOperands = Vocabulary::MaxOperandKinds;
TEST(IR2VecVocabularyTest, DummyVocabTest) {
for (unsigned Dim = 1; Dim <= 10; ++Dim) {
diff --git a/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt b/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
index deabf11..d9da627 100644
--- a/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
+++ b/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
@@ -2,7 +2,7 @@
# libraries, but expects them to exist in the process loading the plugin. This
# doesn't work with DLLs on Windows (where a shared library can't have undefined
# references), so just skip this testcase on Windows.
-if ((NOT WIN32 OR LLVM_BUILD_LLVM_DYLIB) AND NOT CYGWIN)
+if ((NOT WIN32 AND NOT CYGWIN) OR LLVM_BUILD_LLVM_DYLIB)
unset(LLVM_LINK_COMPONENTS)
add_llvm_library(InlineAdvisorPlugin MODULE BUILDTREE_ONLY
InlineAdvisorPlugin.cpp
diff --git a/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt b/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
index 0b37ceb..941e18efc 100644
--- a/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
+++ b/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
@@ -2,7 +2,7 @@
# libraries, but expects them to exist in the process loading the plugin. This
# doesn't work with DLLs on Windows (where a shared library can't have undefined
# references), so just skip this testcase on Windows.
-if ((NOT WIN32 OR LLVM_BUILD_LLVM_DYLIB) AND NOT CYGWIN)
+if ((NOT WIN32 AND NOT CYGWIN) OR LLVM_BUILD_LLVM_DYLIB)
unset(LLVM_LINK_COMPONENTS)
add_llvm_library(InlineOrderPlugin MODULE BUILDTREE_ONLY
InlineOrderPlugin.cpp
diff --git a/llvm/unittests/Analysis/ValueTrackingTest.cpp b/llvm/unittests/Analysis/ValueTrackingTest.cpp
index 4b47655..6af2006 100644
--- a/llvm/unittests/Analysis/ValueTrackingTest.cpp
+++ b/llvm/unittests/Analysis/ValueTrackingTest.cpp
@@ -915,11 +915,11 @@ TEST(ValueTracking, propagatesPoison) {
{true, "call float @llvm.sin.f32(float %fx)", 0},
{true, "call float @llvm.cos.f32(float %fx)", 0},
{true, "call float @llvm.pow.f32(float %fx, float %fy)", 0},
- {false, "call float @llvm.exp.f32(float %fx)", 0},
- {false, "call float @llvm.exp2.f32(float %fx)", 0},
- {false, "call float @llvm.log.f32(float %fx)", 0},
- {false, "call float @llvm.log10.f32(float %fx)", 0},
- {false, "call float @llvm.log2.f32(float %fx)", 0},
+ {true, "call float @llvm.exp.f32(float %fx)", 0},
+ {true, "call float @llvm.exp2.f32(float %fx)", 0},
+ {true, "call float @llvm.log.f32(float %fx)", 0},
+ {true, "call float @llvm.log10.f32(float %fx)", 0},
+ {true, "call float @llvm.log2.f32(float %fx)", 0},
{false, "call float @llvm.fma.f32(float %fx, float %fx, float %fy)", 0},
{false, "call float @llvm.fabs.f32(float %fx)", 0},
{false, "call float @llvm.minnum.f32(float %fx, float %fy)", 0},
@@ -927,17 +927,17 @@ TEST(ValueTracking, propagatesPoison) {
{false, "call float @llvm.minimum.f32(float %fx, float %fy)", 0},
{false, "call float @llvm.maximum.f32(float %fx, float %fy)", 0},
{false, "call float @llvm.copysign.f32(float %fx, float %fy)", 0},
- {false, "call float @llvm.floor.f32(float %fx)", 0},
- {false, "call float @llvm.ceil.f32(float %fx)", 0},
- {false, "call float @llvm.trunc.f32(float %fx)", 0},
- {false, "call float @llvm.rint.f32(float %fx)", 0},
- {false, "call float @llvm.nearbyint.f32(float %fx)", 0},
- {false, "call float @llvm.round.f32(float %fx)", 0},
- {false, "call float @llvm.roundeven.f32(float %fx)", 0},
+ {true, "call float @llvm.floor.f32(float %fx)", 0},
+ {true, "call float @llvm.ceil.f32(float %fx)", 0},
+ {true, "call float @llvm.trunc.f32(float %fx)", 0},
+ {true, "call float @llvm.rint.f32(float %fx)", 0},
+ {true, "call float @llvm.nearbyint.f32(float %fx)", 0},
+ {true, "call float @llvm.round.f32(float %fx)", 0},
+ {true, "call float @llvm.roundeven.f32(float %fx)", 0},
{false, "call i32 @llvm.lround.f32(float %fx)", 0},
{false, "call i64 @llvm.llround.f32(float %fx)", 0},
- {false, "call i32 @llvm.lrint.f32(float %fx)", 0},
- {false, "call i64 @llvm.llrint.f32(float %fx)", 0},
+ {true, "call i32 @llvm.lrint.f32(float %fx)", 0},
+ {true, "call i64 @llvm.llrint.f32(float %fx)", 0},
{false, "call float @llvm.fmuladd.f32(float %fx, float %fx, float %fy)",
0}};