diff options
Diffstat (limited to 'llvm/unittests/Frontend')
-rw-r--r-- | llvm/unittests/Frontend/OpenMPDecompositionTest.cpp | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/llvm/unittests/Frontend/OpenMPDecompositionTest.cpp b/llvm/unittests/Frontend/OpenMPDecompositionTest.cpp index f954113..8f195c4 100644 --- a/llvm/unittests/Frontend/OpenMPDecompositionTest.cpp +++ b/llvm/unittests/Frontend/OpenMPDecompositionTest.cpp @@ -686,12 +686,12 @@ TEST_F(OpenMPDecompositionTest, Order1) { std::string Dir3 = stringify(Dec.output[3]); std::string Dir4 = stringify(Dec.output[4]); std::string Dir5 = stringify(Dec.output[5]); - ASSERT_EQ(Dir0, "target"); // (31) - ASSERT_EQ(Dir1, "teams"); // (31) + ASSERT_EQ(Dir0, "target"); // (31) + ASSERT_EQ(Dir1, "teams"); // (31) ASSERT_EQ(Dir2, "distribute order(1, 0)"); // (31) - ASSERT_EQ(Dir3, "parallel"); // (31) - ASSERT_EQ(Dir4, "for order(1, 0)"); // (31) - ASSERT_EQ(Dir5, "simd order(1, 0)"); // (31) + ASSERT_EQ(Dir3, "parallel"); // (31) + ASSERT_EQ(Dir4, "for order(1, 0)"); // (31) + ASSERT_EQ(Dir5, "simd order(1, 0)"); // (31) } // ALLOCATE @@ -708,8 +708,7 @@ TEST_F(OpenMPDecompositionTest, Allocate1) { // Allocate + firstprivate omp::List<omp::Clause> Clauses{ - {OMPC_allocate, - omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}}, + {OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}}, {OMPC_firstprivate, omp::clause::Firstprivate{{x}}}, }; @@ -719,8 +718,8 @@ TEST_F(OpenMPDecompositionTest, Allocate1) { std::string Dir0 = stringify(Dec.output[0]); std::string Dir1 = stringify(Dec.output[1]); - ASSERT_EQ(Dir0, "parallel shared(x)"); // (33) - ASSERT_EQ(Dir1, "sections firstprivate(x) allocate(, , , (x))"); // (33) + ASSERT_EQ(Dir0, "parallel shared(x)"); // (33) + ASSERT_EQ(Dir1, "sections firstprivate(x) allocate(, , (x))"); // (33) } TEST_F(OpenMPDecompositionTest, Allocate2) { @@ -729,8 +728,7 @@ TEST_F(OpenMPDecompositionTest, Allocate2) { // Allocate + in_reduction omp::List<omp::Clause> Clauses{ - {OMPC_allocate, - omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}}, + {OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}}, {OMPC_in_reduction, omp::clause::InReduction{{{Add}, {x}}}}, }; @@ -740,8 +738,8 @@ TEST_F(OpenMPDecompositionTest, Allocate2) { std::string Dir0 = stringify(Dec.output[0]); std::string Dir1 = stringify(Dec.output[1]); - ASSERT_EQ(Dir0, "target in_reduction((3), (x)) allocate(, , , (x))"); // (33) - ASSERT_EQ(Dir1, "parallel"); // (33) + ASSERT_EQ(Dir0, "target in_reduction((3), (x)) allocate(, , (x))"); // (33) + ASSERT_EQ(Dir1, "parallel"); // (33) } TEST_F(OpenMPDecompositionTest, Allocate3) { @@ -749,8 +747,7 @@ TEST_F(OpenMPDecompositionTest, Allocate3) { // Allocate + linear omp::List<omp::Clause> Clauses{ - {OMPC_allocate, - omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}}, + {OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}}, {OMPC_linear, omp::clause::Linear{{std::nullopt, std::nullopt, std::nullopt, {x}}}}, }; @@ -765,7 +762,7 @@ TEST_F(OpenMPDecompositionTest, Allocate3) { // should be fixed eventually. ASSERT_EQ(Dir0, "parallel shared(x) shared(x)"); // (33) ASSERT_EQ(Dir1, "for linear(, , , (x)) firstprivate(x) lastprivate(, (x)) " - "allocate(, , , (x))"); // (33) + "allocate(, , (x))"); // (33) } TEST_F(OpenMPDecompositionTest, Allocate4) { @@ -773,8 +770,7 @@ TEST_F(OpenMPDecompositionTest, Allocate4) { // Allocate + lastprivate omp::List<omp::Clause> Clauses{ - {OMPC_allocate, - omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}}, + {OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}}, {OMPC_lastprivate, omp::clause::Lastprivate{{std::nullopt, {x}}}}, }; @@ -784,8 +780,8 @@ TEST_F(OpenMPDecompositionTest, Allocate4) { std::string Dir0 = stringify(Dec.output[0]); std::string Dir1 = stringify(Dec.output[1]); - ASSERT_EQ(Dir0, "parallel shared(x)"); // (33) - ASSERT_EQ(Dir1, "sections lastprivate(, (x)) allocate(, , , (x))"); // (33) + ASSERT_EQ(Dir0, "parallel shared(x)"); // (33) + ASSERT_EQ(Dir1, "sections lastprivate(, (x)) allocate(, , (x))"); // (33) } TEST_F(OpenMPDecompositionTest, Allocate5) { @@ -793,8 +789,7 @@ TEST_F(OpenMPDecompositionTest, Allocate5) { // Allocate + private omp::List<omp::Clause> Clauses{ - {OMPC_allocate, - omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}}, + {OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}}, {OMPC_private, omp::clause::Private{{x}}}, }; @@ -804,8 +799,8 @@ TEST_F(OpenMPDecompositionTest, Allocate5) { std::string Dir0 = stringify(Dec.output[0]); std::string Dir1 = stringify(Dec.output[1]); - ASSERT_EQ(Dir0, "parallel"); // (33) - ASSERT_EQ(Dir1, "sections private(x) allocate(, , , (x))"); // (33) + ASSERT_EQ(Dir0, "parallel"); // (33) + ASSERT_EQ(Dir1, "sections private(x) allocate(, , (x))"); // (33) } TEST_F(OpenMPDecompositionTest, Allocate6) { @@ -814,8 +809,7 @@ TEST_F(OpenMPDecompositionTest, Allocate6) { // Allocate + reduction omp::List<omp::Clause> Clauses{ - {OMPC_allocate, - omp::clause::Allocate{{std::nullopt, std::nullopt, std::nullopt, {x}}}}, + {OMPC_allocate, omp::clause::Allocate{{std::nullopt, std::nullopt, {x}}}}, {OMPC_reduction, omp::clause::Reduction{{std::nullopt, {Add}, {x}}}}, }; @@ -825,8 +819,8 @@ TEST_F(OpenMPDecompositionTest, Allocate6) { std::string Dir0 = stringify(Dec.output[0]); std::string Dir1 = stringify(Dec.output[1]); - ASSERT_EQ(Dir0, "parallel shared(x)"); // (33) - ASSERT_EQ(Dir1, "sections reduction(, (3), (x)) allocate(, , , (x))"); // (33) + ASSERT_EQ(Dir0, "parallel shared(x)"); // (33) + ASSERT_EQ(Dir1, "sections reduction(, (3), (x)) allocate(, , (x))"); // (33) } // REDUCTION |