[PATCH] D123920: [OpenMP][IRBuilder] Handle unexcuted EXPECT_FALSE
Shraiysh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 17 22:51:14 PDT 2022
shraiysh created this revision.
Herald added subscribers: rogfer01, guansong, yaxunl.
Herald added a project: All.
shraiysh requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, sstefan1.
Herald added a project: LLVM.
This patch addresses the comment about unexecuted test in D122371 <https://reviews.llvm.org/D122371>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123920
Files:
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Index: llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
===================================================================
--- llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+++ llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
@@ -1194,8 +1194,8 @@
Type *Arg2Type = OutlinedFn->getArg(2)->getType();
EXPECT_TRUE(Arg2Type->isPointerTy());
- EXPECT_TRUE(cast<PointerType>(Arg2Type)
- ->isOpaqueOrPointeeTypeMatches(ArgStructTy));
+ EXPECT_TRUE(
+ cast<PointerType>(Arg2Type)->isOpaqueOrPointeeTypeMatches(ArgStructTy));
}
TEST_F(OpenMPIRBuilderTest, CanonicalLoopSimple) {
@@ -3030,12 +3030,17 @@
EXPECT_TRUE(isa<GlobalVariable>(SingleEndCI->getArgOperand(0)));
EXPECT_EQ(SingleEndCI->getArgOperand(1), SingleEntryCI->getArgOperand(1));
+ CallInst *ExitBarrier = nullptr;
for (auto &FI : *ExitBB) {
Instruction *cur = &FI;
if (auto CI = dyn_cast<CallInst>(cur)) {
- EXPECT_FALSE(CI->getCalledFunction()->getName() == "__kmpc_barrier");
+ if (CI->getCalledFunction()->getName() == "__kmpc_barrier") {
+ ExitBarrier = CI;
+ break;
+ }
}
}
+ EXPECT_EQ(ExitBarrier, nullptr);
}
TEST_F(OpenMPIRBuilderTest, OMPAtomicReadFlt) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123920.423336.patch
Type: text/x-patch
Size: 1220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220418/453aba3e/attachment.bin>
More information about the llvm-commits
mailing list