[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-11 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D131134#3715079 , @craig.topper wrote: > In D131134#3715062 , @pengfei wrote: > >> In D131134#3715024 , @pengfei >> wrote: >> >>> In D131134#

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D131134#3715062 , @pengfei wrote: > In D131134#3715024 , @pengfei wrote: > >> In D131134#3714860 , @craig.topper >> wrote: >> >>> Yes AMX

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-10 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D131134#3715024 , @pengfei wrote: > In D131134#3714860 , @craig.topper > wrote: > >> Yes AMX is only supported in 64-bit mode but I doubt CPUID checks which mode >> the program is run

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-10 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D131134#3714860 , @craig.topper wrote: > Yes AMX is only supported in 64-bit mode but I doubt CPUID checks which mode > the program is running in. I guess `HasAMXSave` is `false` on 32-bit mode https://github.com/llvm/llvm-

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Yes AMX is only supported in 64-bit mode but I doubt CPUID checks which mode the program is running in. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131134/new/ https://reviews.llvm.org/D131134 _

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-10 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. I have the same impression. I checked ISE says AMX instructions are `N.E.` on 32-bit mode. And seems Linux Kernel only enables AMX on 64-bit too https://lwn.net/ml/linux-kernel/20210730145957.7927-22-chang.seok@inte

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-10 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. In D131134#3707397 , @craig.topper wrote: > What problem are we trying to solve here? CPUID reports AMX as supported even > in 32-bit mode. Why can't the user pass it to the compiler? I thought AMX is only supported on 64-bit

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. What problem are we trying to solve here? CPUID reports AMX as supported even in 32-bit mode. Why can't the user pass it to the compiler? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131134/new/ https://reviews.llvm.

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-08 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/X86.cpp:133 +for (auto &F : HostFeatures) { + if (F.first().startswith("amx") && F.second && !Is64bitTarget) +D.Diag(diag::err_feature_unsupported_on_target)

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-08 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 updated this revision to Diff 450724. LiuChen3 added a comment. change the error report Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131134/new/ https://reviews.llvm.org/D131134 Files: clang/include/clang/Basic/DiagnosticCommonKinds.td

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-07 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 updated this revision to Diff 450702. LiuChen3 added a comment. fix lit fail and handle '-march=native' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131134/new/ https://reviews.llvm.org/D131134 Files: clang/include/clang/Basic/Diagnost

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-05 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. In D131134#3699742 , @craig.topper wrote: > How does this interact with `-march=native -m32`. Won't that pick up the amx > flag from CPUID? Good point. I will continue the work. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-05 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. In D131134#3699742 , @craig.topper wrote: > How does this interact with `-march=native -m32`. Won't that pick up the amx > flag from CPUID? In D131134#3699344 , @aaron.ballman wrote

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. How does this interact with `-march=native -m32`. Won't that pick up the amx flag from CPUID? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131134/new/ https://reviews.llvm.org/D131134 ___

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think the precommit CI failures might be relevant here -- can you double-check those? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131134/new/ https://reviews.llvm.org/D131134

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a subscriber: aaron.ballman. pengfei added a comment. This revision is now accepted and ready to land. LGTM, but maybe wait one day or two for other FE folks' opinions. @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131134: [X86] Report error if the amx enabled on the non-64-bits target

2022-08-03 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 created this revision. Herald added a project: All. LiuChen3 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For now we check if the amx intrinsics used on 64-bits target. This check is not accurate. Repository: rG LLVM Github