From 7351b6e417cd0bd1898337e22583b4559b2025b0 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 1 Aug 2024 15:53:38 -0700 Subject: [PATCH] More gcovr exclusions for function multi-versioning --- ConflictSet.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 8187a9a..b610704 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2118,9 +2118,9 @@ scan16(const InternalVersionT *vs, int begin, int end, // GCOVR_EXCL_LINE #elif defined(HAS_AVX) uint32_t conflict; if constexpr (kAVX512) { - conflict = compare16_32bit_avx512(vs, readVersion); + conflict = compare16_32bit_avx512(vs, readVersion); // GCOVR_EXCL_LINE } else { - conflict = compare16_32bit(vs, readVersion); + conflict = compare16_32bit(vs, readVersion); // GCOVR_EXCL_LINE } conflict &= (1 << end) - 1; conflict >>= begin; @@ -2254,9 +2254,12 @@ bool checkMaxBetweenExclusive(Node *n, int begin, int end, uint32_t compared = 0; if constexpr (kAVX512) { - compared = compare16_32bit_avx512(self->childMaxVersion, readVersion); + compared = // GCOVR_EXCL_LINE + compare16_32bit_avx512(self->childMaxVersion, // GCOVR_EXCL_LINE + readVersion); // GCOVR_EXCL_LINE } else { - compared = compare16_32bit(self->childMaxVersion, readVersion); + compared = compare16_32bit(self->childMaxVersion, + readVersion); // GCOVR_EXCL_LINE } return !(compared & mask) && firstRangeOk; @@ -2846,6 +2849,9 @@ bool checkRangeRead(Node *n, std::span begin, return checkRangeReadImpl(n, begin, end, readVersion, tls); } #else +// Only one of these is ever exercised. I'm not worried about somehow not +// calling one of these though. +// GCOVR_EXCL_START __attribute__((target("default"))) bool checkRangeRead(Node *n, std::span begin, std::span end, InternalVersionT readVersion, @@ -2858,6 +2864,7 @@ checkRangeRead(Node *n, std::span begin, ReadContext *tls) { return checkRangeReadImpl(n, begin, end, readVersion, tls); } +// GCOVR_EXCL_STOP #endif // Returns a pointer to the newly inserted node. Caller must set