[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-05-02 Thread zhijian lin via cfe-commits
https://github.com/diggerlin closed https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-30 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. I don't have any further comments. LGTM. https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-26 Thread Lei Huang via cfe-commits
https://github.com/lei137 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/8] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-23 Thread Lei Huang via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %s | FileCheck %s + +int main() { + int ret = 0; + ret += __builtin_cpu_supports("vsx"); + ret += __builtin_cpu_supports("htm"); + ret += __builtin_cpu_supports("cellbe"); + ret +=

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-23 Thread Lei Huang via cfe-commits
@@ -141,46 +149,98 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 - - // Supported COMPARE_OP values. - #define COMP_EQ 0 - + #define SYS_CALL 3 #endif // The value of SUPPORT_METHOD can be

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-04-09 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/7] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-19 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/6] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-18 Thread Amy Kwan via cfe-commits
@@ -16570,32 +16570,53 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-18 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/5] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-18 Thread Amy Kwan via cfe-commits
@@ -141,46 +149,98 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 - - // Supported COMPARE_OP values. - #define COMP_EQ 0 - + #define SYS_CALL 3 #endif // The value of SUPPORT_METHOD can be

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/4] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. static constexpr int MINIMUM_AIX_OS_MAJOR = 7; static constexpr int MINIMUM_AIX_OS_MINOR = 2; - bool

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -0,0 +1,171 @@ +// RUN: echo "int main() { return __builtin_cpu_supports(\"4xxmac\");}" > %t.c nemanjai wrote: This is an interesting way of testing, where we create each test on the fly. I am not against it if it works on all platforms (including Windows).

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -16570,32 +16570,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, nemanjai wrote: This is now a very

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread Nemanja Ivanovic via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/2] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-05 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-29 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/8] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread Amy Kwan via cfe-commits
@@ -16560,32 +16560,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread Amy Kwan via cfe-commits
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. static constexpr int MINIMUM_AIX_OS_MAJOR = 7; static constexpr int MINIMUM_AIX_OS_MINOR = 2; - bool

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread zhijian lin via cfe-commits
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. static constexpr int MINIMUM_AIX_OS_MAJOR = 7; static constexpr int MINIMUM_AIX_OS_MINOR = 2; - bool

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/7] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread Amy Kwan via cfe-commits
@@ -16560,32 +16560,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread Amy Kwan via cfe-commits
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. static constexpr int MINIMUM_AIX_OS_MAJOR = 7; static constexpr int MINIMUM_AIX_OS_MINOR = 2; - bool

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Group review comments. https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread Amy Kwan via cfe-commits
@@ -132,6 +132,14 @@ PPC_LNX_CPU("power10",47) #ifndef AIX_POWERPC_USE_SYS_CONF #define AIX_POWERPC_USE_SYS_CONF #define AIX_SYSCON_IMPL_IDX 1 + #define AIX_SYSCON_CACHE_IDX 5 + #define AIX_SYSCON_SMT_IDX 44 + #define AIX_SYSCON_VMX_IDX 46 + #define AIX_SYSCON_DFP_IDX

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-28 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/6] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-27 Thread Amy Kwan via cfe-commits
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-27 Thread zhijian lin via cfe-commits
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-27 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/5] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-27 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-27 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/4] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/3] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/82809 >From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 23 Feb 2024 13:23:18 -0500 Subject: [PATCH 1/2] Implement a subset of builtin_cpu_supports() features ---

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-backend-powerpc Author: zhijian lin (diggerlin) Changes The features which __builtin_cpu_support() supports are descripted in

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-23 Thread zhijian lin via cfe-commits
https://github.com/diggerlin created https://github.com/llvm/llvm-project/pull/82809 The features which __builtin_cpu_support() supports are descripted in