[PATCH] D151696: [X86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-07-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. Thank so much on all your comments/review to make this happen. Cheers~! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 ___ cfe-commit

[PATCH] D154493: [X86] Support some Intel CPUs for cpu_specific/dispatch feature

2023-07-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a subscriber: hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D1

[PATCH] D154493: [X86] Support some Intel CPUs for cpu_specific/dispatch feature

2023-07-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added inline comments. Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:333 { {"pentium"}, CK_Pentium, ~0U, FeatureX87 | FeatureCMPXCHG8B, 'B', false }, { {"pentium-mmx"}, CK_PentiumMMX, ~0U, FeaturesPentiumMMX, '\0',

[PATCH] D154493: [X86] Support some Intel CPUs for cpu_specific/dispatch feature

2023-07-06 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 537957. FreddyYe marked an inline comment as done. FreddyYe added a comment. Tuned some manglings. SPR should create a new mangling for its feature list. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154493/new

[PATCH] D154493: [X86] Support some Intel CPUs for cpu_specific/dispatch feature

2023-07-06 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:419 // Sapphire Rapids microarchitecture based processors. - { {"sapphirerapids"}, CK_SapphireRapids, FEATURE_AVX512BF16, FeaturesSapphireRapids, '\0', false }, + { {"sapphirerapids"}, CK_

[PATCH] D154493: [X86] Support some Intel CPUs for cpu_specific/dispatch feature

2023-07-06 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 537980. FreddyYe added a comment. Tune test as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154493/new/ https://reviews.llvm.org/D154493 Files: clang/test/CodeGen/attr-cpuspecific-cpus.c llvm/lib/T

[PATCH] D154493: [X86] Support some Intel CPUs for cpu_specific/dispatch feature

2023-07-06 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa10dccf2712f: [X86] Support some Intel CPUs for cpu_specific/dispatch feature (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D155146: Add SHA512 instructions.

2023-07-12 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about this instruction, please refer to t

[PATCH] D155147: Add SM3 instructions.

2023-07-12 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about these instructions, please refer to

[PATCH] D155148: Add SM4 instructions.

2023-07-12 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about these instructions, please refer to

[PATCH] D155145: Add AVX-VNNI-INT16 instructions.

2023-07-13 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: llvm/test/CodeGen/X86/avxvnniint16-intrinsics.ll:2 +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+avx2,+a

[PATCH] D155146: Add SHA512 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540885. FreddyYe marked 15 inline comments as done. FreddyYe added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155146/new/ https://reviews.llvm.org/D155146 Files: clang/docs/R

[PATCH] D155147: Add SM3 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540892. FreddyYe marked 5 inline comments as done. FreddyYe added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155147/new/ https://reviews.llvm.org/D155147 Files: clang/docs/Re

[PATCH] D155146: Add SHA512 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540893. FreddyYe added a comment. Added FIXME for schedule Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155146/new/ https://reviews.llvm.org/D155146 Files: clang/docs/ReleaseNotes.rst clang/include/clang

[PATCH] D155147: Add SM3 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: llvm/lib/Target/X86/X86InstrSSE.td:8331 +VR128:$src2, (loadv4i32 addr:$src3), timm:$src4))]>, + Sched<[WriteVecIMul]>; + } skan wrote: > Is the schedule appropriate? I referred to SHA1MSG1'

[PATCH] D155148: Add SM4 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked 4 inline comments as done. FreddyYe added inline comments. Comment at: llvm/lib/Target/X86/X86InstrSSE.td:8308 +RC:$src2))]>, + Sched<[WriteVecIMul]>; +def rm : I<0xda, MRMSrcMem, (outs RC:$dst), skan wrote: > From

[PATCH] D155148: Add SM4 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540900. FreddyYe marked an inline comment as done. FreddyYe added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155148/new/ https://reviews.llvm.org/D155148 Files: clang/docs/Re

[PATCH] D155146: Add SHA512 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540909. FreddyYe added a comment. Remove `-check-prefix=CHECK` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155146/new/ https://reviews.llvm.org/D155146 Files: clang/docs/ReleaseNotes.rst clang/include/c

[PATCH] D155147: Add SM3 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540949. FreddyYe added a comment. Remove #include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155147/new/ https://reviews.llvm.org/D155147 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/B

[PATCH] D155148: Add SM4 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540950. FreddyYe marked an inline comment as done. FreddyYe added a comment. Remove #include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155148/new/ https://reviews.llvm.org/D155148 Files: clang/docs/Rel

[PATCH] D155146: Add SHA512 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 540951. FreddyYe added a comment. Remove #include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155146/new/ https://reviews.llvm.org/D155146 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/B

[PATCH] D155148: Add SM4 instructions.

2023-07-17 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: clang/test/CodeGen/X86/sm4-builtins.c:5 +#include +#include + RKSimon wrote: > what is stddef.h needed for? Good catch! probably be copy paste error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138900: [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h

2022-11-28 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138900 Files: clang/lib/Headers/cmpccxaddintrin.h cl

[PATCH] D138900: [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h

2022-11-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 478781. FreddyYe added a comment. minor fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138900/new/ https://reviews.llvm.org/D138900 Files: clang/lib/Headers/cmpccxaddintrin.h clang/lib/Headers/immintr

[PATCH] D138900: [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h

2022-11-29 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG51679dc1c9d5: [X86] include cmpccxaddintrin.h from immintrin.h to x86gprintrin.h (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-01 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D139170 Files: clang/lib/Basic/Targets/X86.h clang/te

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-02 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D139170#3965814 , @mgehre-amd wrote: > Do other targets not support > 128 bit integers, or is this PR only the first > conservative step of lifting the limit? I temporary only enabled > 128 bit FP conversion for X86 in htt

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-02 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D139170#3965852 , @mgehre-amd wrote: > In D139170#3965850 , @FreddyYe > wrote: > >> In D139170#3965814 , @mgehre-amd >> wrote: >> >>> Do ot

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-18 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 532494. FreddyYe added a comment. Update cpus-intel.ll. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targets/X86.cpp clang/lib/Basic/Ta

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-18 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked 2 inline comments as done. FreddyYe added inline comments. Comment at: llvm/test/CodeGen/X86/cpus-intel.ll:8 ; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=pentium 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty -; RUN: llc < %s

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-18 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 532517. FreddyYe marked an inline comment as done. FreddyYe added a comment. Typo refine: OnlyForCPUSpecificDispath -> OnlyForCPUDispatchSpecific Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-18 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. Thanks for @RKSimon 's review, I'd like also to mention that https://reviews.llvm.org/D152989 is supposed to be the base commit of here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-19 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:110 FeatureBitset Features; + char Mangling; + bool OnlyForCPUDispatchSpecific; RKSimon wrote: > Do we have a documented list of the mangling values anywhere? The values >

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-19 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 532772. FreddyYe added a comment. Adjust atom_sse4_2_movbe test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targets/X86.cpp clang/lib

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-20 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: clang/test/CodeGen/attr-cpuspecific.c:342 -// CHECK: attributes #[[S]] = {{.*}}"target-features"="+avx,+cmov,+crc32,+cx8,+f16c,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" // CHECK-SAME: "tune-cpu"="ivybridge" -

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-21 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 533155. FreddyYe added a comment. Add missing FeatureCMOV in X8TargetParser.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targets/X86.

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-21 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 533161. FreddyYe added a comment. debug typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targets/X86.cpp clang/lib/Basic/Targets/X86.

[PATCH] D153714: [NFC] Add missing cpu tests in predefined-arch-macros.c

2023-06-24 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Added tests for penryn, nehalem, westmere, sandybridge, ivybridge, haswell, bonnell, silvermont. Repository: rG LLVM G

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-26 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. gentle ping _cpu_dispatch/specific feature owner @erichkeane. Any comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 ___ cfe-co

[PATCH] D152989: Pre-commit test for D151696.

2023-06-26 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. As mentioned in https://reviews.llvm.org/D151696, ping here, too. I want to land this patch first so that I could add some new Intel CPUs in this test supported in https://reviews.llvm.org/D151696 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-26 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D151696#4448573 , @erichkeane wrote: > I think this is OK, I have a slight fear we're losing a bit of the 'tune' > functionality, but it is not impossible that we've never really cared about > that. One concern I have is t

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 534861. FreddyYe added a comment. Added more checks for resolver function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152989/new/ https://reviews.llvm.org/D152989 Files: clang/test/CodeGen/attr-cpuspecif

[PATCH] D121410: Have cpu-specific variants set 'tune-cpu' as an optimization hint

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Herald added a subscriber: StephenFan. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2067 + // favor this processor. + TuneCPU = SD->getCPUName(GD.getMultiVersionIndex())->getName(); +} pengfei wrote: > erichkeane w

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D151696#4448680 , @FreddyYe wrote: > In D151696#4448573 , @erichkeane > wrote: > >> I think this is OK, I have a slight fear we're losing a bit of the 'tune' >> functionality, but it

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. ping for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152989/new/ https://reviews.llvm.org/D152989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 535213. FreddyYe marked an inline comment as done. FreddyYe added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152989/new/ https://reviews.llvm.org/D152989 Files: clang/test/Co

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. It came to me a better style: ATTR(cpu_specific(generic)) void CPU1(void){} ATTR(cpu_specific(pentium_pro)) void CPU2(void){} ATTR(cpu_specific(pentium_mmx)) void CPU3(void){} ATTR(cpu_specific(pentium_ii)) void CPU4(void){} ATTR(cpu_specific(pentium_iii)) void

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 535215. FreddyYe added a comment. Change into a more simplified style. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152989/new/ https://reviews.llvm.org/D152989 Files: clang/test/CodeGen/attr-cpuspecific-c

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: clang/test/CodeGen/attr-cpuspecific-cpus.c:12 + +ATTR(cpu_specific(generic)) void CPU0(void){} +ATTR(cpu_specific(pentium)) void CPU1(void){} skan wrote: > Shouldn't we use the same function name? Emmm... it would invo

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 535223. FreddyYe added a comment. Seperate ALIAS CPUs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152989/new/ https://reviews.llvm.org/D152989 Files: clang/test/CodeGen/attr-cpuspecific-cpus.c clang/te

[PATCH] D153714: [NFC] Add missing cpu tests in predefined-arch-macros.c

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. ping this thread, too. Notice that this is an independent patch :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153714/new/ https://reviews.llvm.org/D153714 ___ cfe-commits ma

[PATCH] D152989: Pre-commit test for D151696.

2023-06-27 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG43baa5986c20: Pre-commit test for D151696. (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-28 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 535277. FreddyYe added a comment. 1. Fixed copy errors of some CPU's manglings 2. Updated resolver function checkers due to more complete feature list changes. 3. Added more cpu checks in attr-cpuspecific-cpus.c Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-28 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. Notice that these two changes are both expected since a more complete feature list won't influence the _cpu_dispatch/specific multiversion to not work. Comment at: clang/test/CodeGen/attr-cpuspecific.c:47 // LINUX: %[[FEAT_INIT:.+]] = load i32, ptr g

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-28 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. gentle ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[PATCH] D153714: [NFC] Add missing cpu tests in predefined-arch-macros.c

2023-06-28 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG548e08c3f635: [NFC] Add missing cpu tests in predefined-arch-macros.c (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153714/new/ http

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added inline comments. Comment at: clang/test/CodeGen/attr-cpuspecific.c:56 // WINDOWS: %[[FEAT_INIT:.+]] = load i32, ptr getelementptr inbounds ({ i32, i32, i32, [1 x i32] }, ptr @__cpu_model, i32 0, i32 3, i32 0), align 4 -/

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added a comment. In D151696#4458443 , @pengfei wrote: > It looks to me the failed unit tests might be related to this patch, please > take a look. This is due to FeatureCMOV adding. Should I split into

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D151696#4458435 , @pengfei wrote: > I have some concerns for RULE 3, especially `core_aes_pclmulqdq -> westmere` > and `atom_sse4_2_movbe -> silvermont`. > Sometimes, we have minor feature differences in the same generation t

[PATCH] D154181: [x86] Add missing FeatureCMOV in frontend targets.

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. The missing info is gathered from X86.td. Repository:

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. > Yes, it looks like it would be best to split off and commit some of the fixes > (cmov / the isa changes causing the attr-cpuspecific.c diffs etc.) first, > before this refactor patch. Done in https://reviews.llvm.org/D154181 Repository: rG LLVM Github Monorepo C

[PATCH] D154181: [x86] Add missing FeatureCMOV in frontend targets.

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa9256a2e0450: [x86] Add missing FeatureCMOV in frontend targets. (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D154181: [x86] Add missing FeatureCMOV in frontend targets.

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. Thanks review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154181/new/ https://reviews.llvm.org/D154181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 536116. FreddyYe added a comment. Rebase for D154181 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targ

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-29 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 536118. FreddyYe added a comment. changes according to the new RULE3, pls review again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targ

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-30 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: clang/test/CodeGen/attr-cpuspecific.c:47 // LINUX: %[[FEAT_INIT:.+]] = load i32, ptr getelementptr inbounds ({ i32, i32, i32, [1 x i32] }, ptr @__cpu_model, i32 0, i32 3, i32 0), align 4 -// LINUX: %[[FEAT_JOIN:.+]] = and i32 %[[FEAT_

[PATCH] D154209: [X86] Add missing features for ivybridge, sandybridge and knl in X86TargetParser.def.

2023-06-30 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This is also a pre-commit change for D151696 Repository: rG LLVM

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling

2023-06-30 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added inline comments. Comment at: clang/test/CodeGen/attr-cpuspecific.c:47 // LINUX: %[[FEAT_INIT:.+]] = load i32, ptr getelementptr inbounds ({ i32, i32, i32, [1 x i32] }, ptr @__cpu_model, i32 0, i32 3, i32 0), align 4 -//

[PATCH] D154209: [X86] Add missing features for ivybridge, sandybridge and knl in X86TargetParser.def.

2023-06-30 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked an inline comment as done. FreddyYe added inline comments. Comment at: llvm/include/llvm/TargetParser/X86TargetParser.def:262 CPU_SPECIFIC("core_i7_sse4_2", "nehalem", 'P', "+cmov,+mmx,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt") CPU_SPECIFIC("core_aes_pcl

[PATCH] D147525: [X86] Add AMX_COMPLEX to Graniterapids

2023-04-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This patch also rename __AMXCOMPLEX__ to __AMX_COMPLEX__

[PATCH] D147525: [X86] Add AMX_COMPLEX to Graniterapids

2023-04-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 510772. FreddyYe added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147525/new/ https://reviews.llvm.org/D147525 Files: clang/lib/Basic/Targets/X86.cpp clang/lib/Headers/immintrin

[PATCH] D147525: [X86] Add AMX_COMPLEX to Graniterapids

2023-04-04 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 510783. FreddyYe added a comment. Remove redundant file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147525/new/ https://reviews.llvm.org/D147525 Files: clang/lib/Basic/Targets/X86.cpp clang/lib/Headers

[PATCH] D147525: [X86] Add AMX_COMPLEX to Graniterapids

2023-04-05 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG847abddedca9: [X86] Add AMX_COMPLEX to Graniterapids (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147525/new/ https://reviews.llvm.

[PATCH] D151537: [NFC] Update cpu_specific test to use a newer CPU

2023-05-25 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151537 Files: clang/test/CodeGen/attr-cpuspecific.c I

[PATCH] D151696: Remove CPU_SPECIFIC* MACROs and use unified getManglingForCPU

2023-05-30 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. FreddyYe requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llv

[PATCH] D151537: [NFC] Update cpu_specific test to use a newer CPU

2023-06-13 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. This patch is mainly for another WIP patch https://reviews.llvm.org/D151696, while I realize maybe it's too aggressive to support too many CPUs with -march, -mcpu, ... I'll reimplement the WIP patch to try to make the supports range same as before. Close this first.

[PATCH] D152989: Pre-commit test for D151696.

2023-06-14 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a project: All. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Meanwhile this patch added missing tests for supported CPU names of cpu_dispatch/specific attribute. Repository: rG LL

[PATCH] D151696: [WIP] Remove CPU_SPECIFIC* MACROs and use unified getManglingForCPU

2023-06-14 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 531596. FreddyYe added a comment. Update to a more conservative change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targets/X86.cpp cl

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-14 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 531615. FreddyYe added a comment. misc refine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.org/D151696 Files: clang/lib/Basic/Targets/X86.cpp clang/lib/Basic/Targets/X86

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-14 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. This patch means to remove `CPU_SPECIFIC*` MACROs in X86TargetParser.def and move that part of functionality into X86TargetParser.cpp. Since these two files **both** maintain a table with `cpuname`, `features of this cpu supported`, ... This move can reduce the codes.

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-15 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: llvm/lib/TargetParser/X86TargetParser.cpp:314 + // Empty processor. Include X87 and CMPXCHG8 for backwards compatibility. + { {""}, CK_None, ~0U, FeatureX87 | FeatureCMPXCHG8B, '\0', false }, + { {"generic"}, CK_None, ~0U, FeaturesPen

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-15 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 531993. FreddyYe added a comment. 1. Update generic and pentium Features to align with X86.td. 2. Readjust tests in cpus-intel.ll Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151696/new/ https://reviews.llvm.

[PATCH] D151696: [x86] Remove CPU_SPECIFIC* MACROs and add getManglingForCPU

2023-06-15 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe marked 2 inline comments as done. FreddyYe added inline comments. Comment at: llvm/test/CodeGen/X86/cpus-intel.ll:26 ; RUN: llc < %s -o /dev/null -mtriple=i686-unknown-unknown -mcpu=emeraldrapids 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ERROR --allow-empty +; RUN: l

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 480305. FreddyYe added a comment. Rebase and add release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139170/new/ https://reviews.llvm.org/D139170 Files: clang/docs/ReleaseNotes.rst clang/lib/Basic

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-05 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. THX for review. I'll land! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139170/new/ https://reviews.llvm.org/D139170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D139170: [X86][clang] Lift _BitInt() supported max width.

2022-12-05 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdef720726b73: [X86][clang] Lift _BitInt() supported max width. (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D116325: [X86] Add missing CET intrinsics support

2022-01-03 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0bab74280570: [X86] Add missing CET intrinsics support (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-12 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a subscriber: pengfei. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The name `__bfloat` may mislead its real type is bfloat16, but in fact it's not. Repository: rG LLVM Github Mon

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-13 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added inline comments. Comment at: clang/lib/Headers/avx512vlbf16intrin.h:416 ///and fraction field is truncated to 7 bits. -static __inline__ __bfloat16 __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh(float __A) { +static __inline__ short __DEFAULT_FN_ATTRS128 _mm_cvtness_sb

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-13 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 394134. FreddyYe added a comment. changed into `unsigned short` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115611/new/ https://reviews.llvm.org/D115611 Files: clang/lib/Headers/avx512bf16intrin.h clang

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-13 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 394137. FreddyYe added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115611/new/ https://reviews.llvm.org/D115611 Files: clang/lib/Headers/avx512bf16intrin.h clang/lib/Headers/avx5

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-13 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe abandoned this revision. FreddyYe added a comment. agree with @pengfei . sorry for noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115611/new/ https://reviews.llvm.org/D115611 ___ cfe-commi

[PATCH] D116325: [X86] Add missing CET intrinsics support

2021-12-27 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added a subscriber: pengfei. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. These two intrinsics are documented o SDM and intrinsic guide. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-07 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: dexonsmith, pengfei, hiraditya. FreddyYe requested review of this revision. Herald added projects: clang, Sanitizers, LLVM. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits. Repository: rG LLVM Github Monorepo https://revi

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-07 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. THX for review! Comment at: clang/test/Preprocessor/predefined-arch-macros.c:1396 +// RUN: %clang -march=rocketlake -m32 -E -dM %s -o - 2>&1 \ +// RUN: -target i386-unknown-linux \ MaskRay wrote: > The file may need some refactor

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-07 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 336007. FreddyYe added a comment. Updating according to comments. Test refactoring not done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100085/new/ https://reviews.llvm.org/D100085 Files: clang/lib/Basic

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-07 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. Hi @MaskRay, I tried to refactor, but met some difficulties. Since these defines are dictionary ordered, a new #define may insert into a common CHECK. So it is difficult to let different RUN share common CHECKs. // RUN: %clang -march=pentium-mmx -m32 -E -dM %s -o - 2

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. In D100085#2675965 , @MaskRay wrote: > In D100085#2675919 , @FreddyYe > wrote: > >> Hi @MaskRay, I tried to refactor, but met some difficulties. Since these >> defines are dictionary or

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe updated this revision to Diff 336133. FreddyYe added a comment. Herald added a subscriber: jfb. update lit test and clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100085/new/ https://reviews.llvm.org/D100085 Files: clang/lib

[PATCH] D100085: [X86] Support -march=rocketlake

2021-04-08 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe added a comment. Hi @MaskRay , I tried to refactor the test file by assembling the common CHECKs. But I found it will lead to too many check-prefixes ine one RUN line. For example, // RUN: %clang -march=c3 -m32 -E -dM %s -o - 2>&1 \ // RUN: -target i386-unknown-linux \ // RUN

<    1   2   3   4   >