[clang] [llvm] [Clang][Lexer] Reland "Detect SSE4.2 availability at runtime in fastParseASCIIIdentifier" (PR #175452)

Thibault Monnier via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 18 04:39:50 PST 2026


================
@@ -1943,14 +1957,17 @@ fastParseASCIIIdentifier(const char *CurPtr,
       continue;
     return CurPtr;
   }
-#endif
 
-  unsigned char C = *CurPtr;
-  while (isAsciiIdentifierContinue(C))
-    C = *++CurPtr;
-  return CurPtr;
+  return fastParseASCIIIdentifierScalar(CurPtr);
 }
 
+LLVM_UNLESS_SSE42(__attribute__((target("default"))))
+#endif
+LLVM_UNLESS_SSE42(static const char *fastParseASCIIIdentifier(
----------------
Thibault-Monnier wrote:

I combined both, then decided it was cleaner to just use #ifndef __SSE4_2__ directly.

https://github.com/llvm/llvm-project/pull/175452


More information about the cfe-commits mailing list