================
@@ -1943,12 +1955,20 @@ fastParseASCIIIdentifier(const char *CurPtr,
       continue;
     return CurPtr;
   }
-#endif
 
-  unsigned char C = *CurPtr;
-  while (isAsciiIdentifierContinue(C))
-    C = *++CurPtr;
-  return CurPtr;
+  return fastParseASCIIIdentifierScalar(CurPtr);
+}
+
+__attribute__((target("sse4.2"))) static const char *
+fastParseASCIIIdentifier(const char *CurPtr, const char *BufferEnd) {
----------------
mikaelholmen wrote:

Ok. I've reproduced on 2f2fe489d76, just before your revert.

The machine I saw this on runs RHEL8 and /proc/cpuinfo says the following:
```
vendor_id       : GenuineIntel
cpu family      : 6
model           : 106
model name      : Intel(R) Xeon(R) Gold 6342 CPU @ 2.80GHz
stepping        : 6
microcode       : 0xd000410
cpu MHz         : 3135.042
cache size      : 36864 KB
physical id     : 1
siblings        : 48
core id         : 23
cpu cores       : 24
apicid          : 111
initial apicid  : 111
fpu             : yes
fpu_exception   : yes
cpuid level     : 27
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb 
rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology 
nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 
ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt 
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch 
cpuid_fault epb cat_l3 invpcid_single ssbd mba ibrs ibpb stibp ibrs_enhanced 
fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq 
rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw 
avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total 
cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts avx512vbmi 
umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme 
avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
```
Somewhat reduced cmake command:
```
[cmake-path]/3.27.2/bin/cmake /repo/llvm-project/llvm 
-DCMAKE_C_COMPILER='[clang-path]/18.1.8/bin/clang' 
-DCMAKE_CXX_COMPILER='[clang-path]/18.1.8/bin/clang++' -G Ninja 
-DCMAKE_MAKE_PROGRAM=[ninja-path]/1.10.2/bin/ninja -DCMAKE_BUILD_TYPE=Release 
-DLLVM_STATIC_LINK_CXX_STDLIB=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON 
-DCMAKE_C_FLAGS=' -march=corei7 -Wunused-function -Werror=unused-function' 
-DCMAKE_CXX_FLAGS=' -march=corei7 -Wunused-function -Werror=unused-function' 
-DLLVM_APPEND_VC_REV=OFF -DLLVM_ENABLE_WERROR=OFF -DLLVM_ENABLE_PROJECTS='clang'
```

Then
```
[ninja-path]/1.10.2/bin/ninja -j96 clang
```
results in
```
/repo/llvm-project/clang/lib/Lex/Lexer.cpp:1962:1: error: unused function 
'fastParseASCIIIdentifier' [-Werror,-Wunused-function]
```

https://github.com/llvm/llvm-project/pull/171914
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to