[libc-commits] [PATCH] D155979: [libc] Disable 'DecodeInOtherBases` test on GPU targets

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 21 09:22:38 PDT 2023


jhuber6 updated this revision to Diff 542966.
jhuber6 added a comment.

Fix


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155979/new/

https://reviews.llvm.org/D155979

Files:
  libc/test/src/stdlib/StrtolTest.h


Index: libc/test/src/stdlib/StrtolTest.h
===================================================================
--- libc/test/src/stdlib/StrtolTest.h
+++ libc/test/src/stdlib/StrtolTest.h
@@ -8,6 +8,7 @@
 
 #include "src/__support/CPP/limits.h"
 #include "src/__support/CPP/type_traits.h"
+#include "src/__support/macros/properties/architectures.h"
 #include "src/errno/libc_errno.h"
 #include "test/UnitTest/Test.h"
 
@@ -198,6 +199,8 @@
   }
 
   void DecodeInOtherBases(FunctionT func) {
+    // This test is excessively slow on the GPU so we disable it there.
+#if !defined(LIBC_TARGET_ARCH_IS_GPU)
     char small_string[4] = {'\0', '\0', '\0', '\0'};
     for (int base = 2; base <= 36; ++base) {
       for (int first_digit = 0; first_digit <= 36; ++first_digit) {
@@ -291,6 +294,7 @@
         }
       }
     }
+#endif
   }
 
   void CleanBaseSixteenDecode(FunctionT func) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155979.542966.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230721/33d0bdb8/attachment.bin>


More information about the libc-commits mailing list