summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-02-15 12:13:59 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2024-02-20 08:53:58 +0000
commit5d581b8bd10f043e6b73fa0436d5003acaca4934 (patch)
treeaaacc10f87222881491a9d004b228ecd1d6e0bc3 /compiler
parent8e18c45e19e73d6e4d28c69606a4aae95e4447f7 (diff)
riscv64: Enable some gtests.
Keep tests disabled for riscv64 if they are disabled for arm and arm64. Fix `GetInstructionSetFromELF()` to recognize riscv64. This partially reverts commit 476491deb9f9abb04f25888a20280d950714048b . Test: run-gtests.sh Bug: 271573990 Change-Id: Iccf1e2b1e93ed09eaf27884c34696f42fd752ec4
Diffstat (limited to 'compiler')
-rw-r--r--compiler/compiler_reflection_test.cc1
-rw-r--r--compiler/optimizing/linearize_test.cc7
-rw-r--r--compiler/optimizing/live_ranges_test.cc6
-rw-r--r--compiler/optimizing/liveness_test.cc12
-rw-r--r--compiler/optimizing/loop_optimization_test.cc10
-rw-r--r--compiler/optimizing/ssa_liveness_analysis_test.cc9
6 files changed, 0 insertions, 45 deletions
diff --git a/compiler/compiler_reflection_test.cc b/compiler/compiler_reflection_test.cc
index d8e2b9e5b9..f3c07db136 100644
--- a/compiler/compiler_reflection_test.cc
+++ b/compiler/compiler_reflection_test.cc
@@ -29,7 +29,6 @@ namespace art HIDDEN {
class CompilerReflectionTest : public CommonCompilerTest {};
TEST_F(CompilerReflectionTest, StaticMainMethod) {
- TEST_DISABLED_FOR_RISCV64();
ScopedObjectAccess soa(Thread::Current());
jobject jclass_loader = LoadDex("Main");
StackHandleScope<1> hs(soa.Self());
diff --git a/compiler/optimizing/linearize_test.cc b/compiler/optimizing/linearize_test.cc
index 6f4f2b6cf6..01daa23511 100644
--- a/compiler/optimizing/linearize_test.cc
+++ b/compiler/optimizing/linearize_test.cc
@@ -55,7 +55,6 @@ void LinearizeTest::TestCode(const std::vector<uint16_t>& data,
}
TEST_F(LinearizeTest, CFG1) {
- TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
@@ -81,7 +80,6 @@ TEST_F(LinearizeTest, CFG1) {
}
TEST_F(LinearizeTest, CFG2) {
- TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
@@ -107,7 +105,6 @@ TEST_F(LinearizeTest, CFG2) {
}
TEST_F(LinearizeTest, CFG3) {
- TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
@@ -135,7 +132,6 @@ TEST_F(LinearizeTest, CFG3) {
}
TEST_F(LinearizeTest, CFG4) {
- TEST_DISABLED_FOR_RISCV64();
/* Structure of this graph (+ are back edges)
// Block0
// |
@@ -166,7 +162,6 @@ TEST_F(LinearizeTest, CFG4) {
}
TEST_F(LinearizeTest, CFG5) {
- TEST_DISABLED_FOR_RISCV64();
/* Structure of this graph (+ are back edges)
// Block0
// |
@@ -197,7 +192,6 @@ TEST_F(LinearizeTest, CFG5) {
}
TEST_F(LinearizeTest, CFG6) {
- TEST_DISABLED_FOR_RISCV64();
// Block0
// |
// Block1
@@ -224,7 +218,6 @@ TEST_F(LinearizeTest, CFG6) {
}
TEST_F(LinearizeTest, CFG7) {
- TEST_DISABLED_FOR_RISCV64();
// Structure of this graph (+ are back edges)
// Block0
// |
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc
index 7e488ba41d..fb1a23eef4 100644
--- a/compiler/optimizing/live_ranges_test.cc
+++ b/compiler/optimizing/live_ranges_test.cc
@@ -47,7 +47,6 @@ HGraph* LiveRangesTest::BuildGraph(const std::vector<uint16_t>& data) {
}
TEST_F(LiveRangesTest, CFG1) {
- TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* return 0;
@@ -82,7 +81,6 @@ TEST_F(LiveRangesTest, CFG1) {
}
TEST_F(LiveRangesTest, CFG2) {
- TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -127,7 +125,6 @@ TEST_F(LiveRangesTest, CFG2) {
}
TEST_F(LiveRangesTest, CFG3) {
- TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -197,7 +194,6 @@ TEST_F(LiveRangesTest, CFG3) {
}
TEST_F(LiveRangesTest, Loop1) {
- TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -274,7 +270,6 @@ TEST_F(LiveRangesTest, Loop1) {
}
TEST_F(LiveRangesTest, Loop2) {
- TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
@@ -346,7 +341,6 @@ TEST_F(LiveRangesTest, Loop2) {
}
TEST_F(LiveRangesTest, CFG4) {
- TEST_DISABLED_FOR_RISCV64();
/*
* Test the following snippet:
* var a = 0;
diff --git a/compiler/optimizing/liveness_test.cc b/compiler/optimizing/liveness_test.cc
index 6af07aea4e..0b421cf9e6 100644
--- a/compiler/optimizing/liveness_test.cc
+++ b/compiler/optimizing/liveness_test.cc
@@ -70,7 +70,6 @@ void LivenessTest::TestCode(const std::vector<uint16_t>& data, const char* expec
}
TEST_F(LivenessTest, CFG1) {
- TEST_DISABLED_FOR_RISCV64();
const char* expected =
"Block 0\n"
" live in: (0)\n"
@@ -94,7 +93,6 @@ TEST_F(LivenessTest, CFG1) {
}
TEST_F(LivenessTest, CFG2) {
- TEST_DISABLED_FOR_RISCV64();
const char* expected =
"Block 0\n"
" live in: (0)\n"
@@ -117,7 +115,6 @@ TEST_F(LivenessTest, CFG2) {
}
TEST_F(LivenessTest, CFG3) {
- TEST_DISABLED_FOR_RISCV64();
const char* expected =
"Block 0\n" // entry block
" live in: (000)\n"
@@ -147,7 +144,6 @@ TEST_F(LivenessTest, CFG3) {
}
TEST_F(LivenessTest, CFG4) {
- TEST_DISABLED_FOR_RISCV64();
// var a;
// if (0 == 0) {
// a = 5;
@@ -196,7 +192,6 @@ TEST_F(LivenessTest, CFG4) {
}
TEST_F(LivenessTest, CFG5) {
- TEST_DISABLED_FOR_RISCV64();
// var a = 0;
// if (0 == 0) {
// } else {
@@ -242,7 +237,6 @@ TEST_F(LivenessTest, CFG5) {
}
TEST_F(LivenessTest, Loop1) {
- TEST_DISABLED_FOR_RISCV64();
// Simple loop with one preheader and one back edge.
// var a = 0;
// while (a == a) {
@@ -289,7 +283,6 @@ TEST_F(LivenessTest, Loop1) {
}
TEST_F(LivenessTest, Loop3) {
- TEST_DISABLED_FOR_RISCV64();
// Test that the returned value stays live in a preceding loop.
// var a = 0;
// while (a == a) {
@@ -337,7 +330,6 @@ TEST_F(LivenessTest, Loop3) {
TEST_F(LivenessTest, Loop4) {
- TEST_DISABLED_FOR_RISCV64();
// Make sure we support a preheader of a loop not being the first predecessor
// in the predecessor list of the header.
// var a = 0;
@@ -390,7 +382,6 @@ TEST_F(LivenessTest, Loop4) {
}
TEST_F(LivenessTest, Loop5) {
- TEST_DISABLED_FOR_RISCV64();
// Make sure we create a preheader of a loop when a header originally has two
// incoming blocks and one back edge.
// Bitsets are made of:
@@ -447,7 +438,6 @@ TEST_F(LivenessTest, Loop5) {
}
TEST_F(LivenessTest, Loop6) {
- TEST_DISABLED_FOR_RISCV64();
// Bitsets are made of:
// (constant0, constant4, constant5, phi in block 2)
const char* expected =
@@ -499,7 +489,6 @@ TEST_F(LivenessTest, Loop6) {
TEST_F(LivenessTest, Loop7) {
- TEST_DISABLED_FOR_RISCV64();
// Bitsets are made of:
// (constant0, constant4, constant5, phi in block 2, phi in block 6)
const char* expected =
@@ -554,7 +543,6 @@ TEST_F(LivenessTest, Loop7) {
}
TEST_F(LivenessTest, Loop8) {
- TEST_DISABLED_FOR_RISCV64();
// var a = 0;
// while (a == a) {
// a = a + a;
diff --git a/compiler/optimizing/loop_optimization_test.cc b/compiler/optimizing/loop_optimization_test.cc
index 49e3c0418f..7f694fb655 100644
--- a/compiler/optimizing/loop_optimization_test.cc
+++ b/compiler/optimizing/loop_optimization_test.cc
@@ -30,7 +30,6 @@ namespace art HIDDEN {
class LoopOptimizationTest : public OptimizingUnitTest {
protected:
void SetUp() override {
- TEST_SETUP_DISABLED_FOR_RISCV64();
OptimizingUnitTest::SetUp();
graph_ = CreateGraph();
@@ -45,7 +44,6 @@ class LoopOptimizationTest : public OptimizingUnitTest {
}
void TearDown() override {
- TEST_TEARDOWN_DISABLED_FOR_RISCV64();
codegen_.reset();
compiler_options_.reset();
graph_ = nullptr;
@@ -136,20 +134,17 @@ class LoopOptimizationTest : public OptimizingUnitTest {
//
TEST_F(LoopOptimizationTest, NoLoops) {
- TEST_DISABLED_FOR_RISCV64();
PerformAnalysis();
EXPECT_EQ("", LoopStructure());
}
TEST_F(LoopOptimizationTest, SingleLoop) {
- TEST_DISABLED_FOR_RISCV64();
AddLoop(entry_block_, return_block_);
PerformAnalysis();
EXPECT_EQ("[]", LoopStructure());
}
TEST_F(LoopOptimizationTest, LoopNest10) {
- TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -161,7 +156,6 @@ TEST_F(LoopOptimizationTest, LoopNest10) {
}
TEST_F(LoopOptimizationTest, LoopSequence10) {
- TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -173,7 +167,6 @@ TEST_F(LoopOptimizationTest, LoopSequence10) {
}
TEST_F(LoopOptimizationTest, LoopSequenceOfNests) {
- TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -201,7 +194,6 @@ TEST_F(LoopOptimizationTest, LoopSequenceOfNests) {
}
TEST_F(LoopOptimizationTest, LoopNestWithSequence) {
- TEST_DISABLED_FOR_RISCV64();
HBasicBlock* b = entry_block_;
HBasicBlock* s = return_block_;
for (int i = 0; i < 10; i++) {
@@ -223,7 +215,6 @@ TEST_F(LoopOptimizationTest, LoopNestWithSequence) {
//
// This is a test for nodes.cc functionality - HGraph::SimplifyLoop.
TEST_F(LoopOptimizationTest, SimplifyLoopReoderPredecessors) {
- TEST_DISABLED_FOR_RISCV64();
// Can't use AddLoop as we want special order for blocks predecessors.
HBasicBlock* header = new (GetAllocator()) HBasicBlock(graph_);
HBasicBlock* body = new (GetAllocator()) HBasicBlock(graph_);
@@ -269,7 +260,6 @@ TEST_F(LoopOptimizationTest, SimplifyLoopReoderPredecessors) {
//
// This is a test for nodes.cc functionality - HGraph::SimplifyLoop.
TEST_F(LoopOptimizationTest, SimplifyLoopSinglePreheader) {
- TEST_DISABLED_FOR_RISCV64();
HBasicBlock* header = AddLoop(entry_block_, return_block_);
header->InsertInstructionBefore(
diff --git a/compiler/optimizing/ssa_liveness_analysis_test.cc b/compiler/optimizing/ssa_liveness_analysis_test.cc
index 18c945381d..2df0f34c7d 100644
--- a/compiler/optimizing/ssa_liveness_analysis_test.cc
+++ b/compiler/optimizing/ssa_liveness_analysis_test.cc
@@ -31,7 +31,6 @@ namespace art HIDDEN {
class SsaLivenessAnalysisTest : public OptimizingUnitTest {
protected:
void SetUp() override {
- TEST_SETUP_DISABLED_FOR_RISCV64();
OptimizingUnitTest::SetUp();
graph_ = CreateGraph();
compiler_options_ = CommonCompilerTest::CreateCompilerOptions(kRuntimeISA, "default");
@@ -43,11 +42,6 @@ class SsaLivenessAnalysisTest : public OptimizingUnitTest {
graph_->SetEntryBlock(entry_);
}
- void TearDown() override {
- TEST_TEARDOWN_DISABLED_FOR_RISCV64();
- OptimizingUnitTest::TearDown();
- }
-
protected:
HBasicBlock* CreateSuccessor(HBasicBlock* block) {
HGraph* graph = block->GetGraph();
@@ -64,7 +58,6 @@ class SsaLivenessAnalysisTest : public OptimizingUnitTest {
};
TEST_F(SsaLivenessAnalysisTest, TestReturnArg) {
- TEST_DISABLED_FOR_RISCV64();
HInstruction* arg = new (GetAllocator()) HParameterValue(
graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kInt32);
entry_->AddInstruction(arg);
@@ -85,7 +78,6 @@ TEST_F(SsaLivenessAnalysisTest, TestReturnArg) {
}
TEST_F(SsaLivenessAnalysisTest, TestAput) {
- TEST_DISABLED_FOR_RISCV64();
HInstruction* array = new (GetAllocator()) HParameterValue(
graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference);
HInstruction* index = new (GetAllocator()) HParameterValue(
@@ -155,7 +147,6 @@ TEST_F(SsaLivenessAnalysisTest, TestAput) {
}
TEST_F(SsaLivenessAnalysisTest, TestDeoptimize) {
- TEST_DISABLED_FOR_RISCV64();
HInstruction* array = new (GetAllocator()) HParameterValue(
graph_->GetDexFile(), dex::TypeIndex(0), 0, DataType::Type::kReference);
HInstruction* index = new (GetAllocator()) HParameterValue(