Skip to content

Commit 9f8748e

Browse files
committed
Check the bool type directly.
1 parent df76828 commit 9f8748e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/unittests/IR/VPIntrinsicTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ TEST_F(VPIntrinsicTest, IntrinsicIDRoundTrip) {
370370
/// Check that going from intrinsic to VP intrinsic and back results in the same
371371
/// intrinsic.
372372
TEST_F(VPIntrinsicTest, IntrinsicToVPRoundTrip) {
373-
unsigned FullTripCounts = 0;
373+
bool IsFullTrip = false;
374374
Intrinsic::ID IntrinsicID = Intrinsic::not_intrinsic + 1;
375375
for (; IntrinsicID < Intrinsic::num_intrinsics; IntrinsicID++) {
376376
Intrinsic::ID VPID = VPIntrinsic::getForIntrinsic(IntrinsicID);
@@ -391,9 +391,9 @@ TEST_F(VPIntrinsicTest, IntrinsicToVPRoundTrip) {
391391
continue;
392392

393393
ASSERT_EQ(*RoundTripIntrinsicID, IntrinsicID);
394-
++FullTripCounts;
394+
IsFullTrip = true;
395395
}
396-
ASSERT_NE(FullTripCounts, 0u);
396+
ASSERT_TRUE(IsFullTrip);
397397
}
398398

399399
/// Check that going from VP intrinsic to equivalent non-predicated intrinsic
@@ -402,7 +402,7 @@ TEST_F(VPIntrinsicTest, VPToNonPredIntrinsicRoundTrip) {
402402
std::unique_ptr<Module> M = createVPDeclarationModule();
403403
assert(M);
404404

405-
unsigned FullTripCounts = 0;
405+
bool IsFullTrip = false;
406406
for (const auto &VPDecl : *M) {
407407
auto VPID = VPDecl.getIntrinsicID();
408408
std::optional<Intrinsic::ID> NonPredID =
@@ -415,9 +415,9 @@ TEST_F(VPIntrinsicTest, VPToNonPredIntrinsicRoundTrip) {
415415
Intrinsic::ID RoundTripVPID = VPIntrinsic::getForIntrinsic(*NonPredID);
416416

417417
ASSERT_EQ(RoundTripVPID, VPID);
418-
++FullTripCounts;
418+
IsFullTrip = true;
419419
}
420-
ASSERT_NE(FullTripCounts, 0u);
420+
ASSERT_TRUE(IsFullTrip);
421421
}
422422

423423
/// Check that VPIntrinsic::getDeclarationForParams works.

0 commit comments

Comments
 (0)