[clang] fc55308 - [PowerPC][Power10] Fix VINS* (vector insert byte/half/word) instructions to have i32 arguments.

2020-07-15 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-07-16T00:30:24-05:00 New Revision: fc55308628709bfc64b100dadf9a030fbb2afaee URL: https://github.com/llvm/llvm-project/commit/fc55308628709bfc64b100dadf9a030fbb2afaee DIFF: https://github.com/llvm/llvm-project/commit/fc55308628709bfc64b100dadf9a030fbb2afaee.diff LOG:

[clang] 08b4a50 - [PowerPC][Power10] Fix the Test LSB by Byte (xvtlsbb) Builtins Implementation

2020-07-22 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-07-22T13:27:05-05:00 New Revision: 08b4a50e39d8b8db17b8eddacba795e99304e418 URL: https://github.com/llvm/llvm-project/commit/08b4a50e39d8b8db17b8eddacba795e99304e418 DIFF: https://github.com/llvm/llvm-project/commit/08b4a50e39d8b8db17b8eddacba795e99304e418.diff LOG:

[clang] 5f11027 - [PowerPC][Power10] Fix vins*vlx instructions to have i32 arguments.

2020-07-22 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-07-22T17:58:14-05:00 New Revision: 5f110273954ac152c9690b6cdf2a2e46f8908f0a URL: https://github.com/llvm/llvm-project/commit/5f110273954ac152c9690b6cdf2a2e46f8908f0a DIFF: https://github.com/llvm/llvm-project/commit/5f110273954ac152c9690b6cdf2a2e46f8908f0a.diff LOG:

[clang] 74790a5 - [PowerPC] Implement Truncate and Store VSX Vector Builtins

2020-07-24 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-07-24T19:22:39-05:00 New Revision: 74790a5dde9ae01b7e96bea0b2596ef37b5325bd URL: https://github.com/llvm/llvm-project/commit/74790a5dde9ae01b7e96bea0b2596ef37b5325bd DIFF: https://github.com/llvm/llvm-project/commit/74790a5dde9ae01b7e96bea0b2596ef37b5325bd.diff LOG:

[clang] 62f5ba6 - [PowerPC][Power10] Implement Test LSB by Byte Builtins in LLVM/Clang

2020-07-13 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-07-13T22:47:47-05:00 New Revision: 62f5ba624bfba5ccf4446737ad2bfb1fc013b376 URL: https://github.com/llvm/llvm-project/commit/62f5ba624bfba5ccf4446737ad2bfb1fc013b376 DIFF: https://github.com/llvm/llvm-project/commit/62f5ba624bfba5ccf4446737ad2bfb1fc013b376.diff LOG:

[clang] c45c161 - [PowerPC][Power10] Implement Parallel Bits Deposit/Extract Builtins in LLVM/Clang

2020-06-18 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-06-18T16:23:56-05:00 New Revision: c45c1611303b4609016fa69c1c987ede3bf92006 URL: https://github.com/llvm/llvm-project/commit/c45c1611303b4609016fa69c1c987ede3bf92006 DIFF: https://github.com/llvm/llvm-project/commit/c45c1611303b4609016fa69c1c987ede3bf92006.diff LOG:

[clang] cc95635 - [PowerPC][Power10] Implement Vector Clear Left/Rightmost Bytes Builtins in LLVM/Clang

2020-06-20 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-06-20T18:29:16-05:00 New Revision: cc95635b1bf28e626b4c2ac296b0a0ca22ab3c91 URL: https://github.com/llvm/llvm-project/commit/cc95635b1bf28e626b4c2ac296b0a0ca22ab3c91 DIFF: https://github.com/llvm/llvm-project/commit/cc95635b1bf28e626b4c2ac296b0a0ca22ab3c91.diff LOG:

[clang] 19df9e2 - [PowerPC][Power10] Implement VSX PCV Generate Operations in LLVM/Clang

2020-06-22 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-06-22T21:09:34-05:00 New Revision: 19df9e2959cfa3f25d798bd842df798e2b75f1b2 URL: https://github.com/llvm/llvm-project/commit/19df9e2959cfa3f25d798bd842df798e2b75f1b2 DIFF: https://github.com/llvm/llvm-project/commit/19df9e2959cfa3f25d798bd842df798e2b75f1b2.diff LOG:

[clang] d82f26c - [PowerPC][Power10] Implement Count Leading/Trailing Zeroes Builtins under bit Mask in LLVM/Clang

2020-06-24 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-06-24T16:03:45-05:00 New Revision: d82f26cc4bc7cb78f7ef327fa43a93e3d0ff9706 URL: https://github.com/llvm/llvm-project/commit/d82f26cc4bc7cb78f7ef327fa43a93e3d0ff9706 DIFF: https://github.com/llvm/llvm-project/commit/d82f26cc4bc7cb78f7ef327fa43a93e3d0ff9706.diff LOG:

[clang] e0c02dc - [PowerPC][Power10] Implement centrifuge, vector gather every nth bit, vector evaluate Builtins in LLVM/Clang

2020-06-25 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-06-25T21:34:41-05:00 New Revision: e0c02dc9800ebd317d1369848f4e74c8f783533a URL: https://github.com/llvm/llvm-project/commit/e0c02dc9800ebd317d1369848f4e74c8f783533a DIFF: https://github.com/llvm/llvm-project/commit/e0c02dc9800ebd317d1369848f4e74c8f783533a.diff LOG:

[clang] c4e5743 - [PowerPC] Implement low-order Vector Modulus Builtins, and add Vector Multiply/Divide/Modulus Builtins Tests

2020-07-31 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-07-31T10:58:07-05:00 New Revision: c4e574323210feda1a3988e85fdd93b90a63d1b1 URL: https://github.com/llvm/llvm-project/commit/c4e574323210feda1a3988e85fdd93b90a63d1b1 DIFF: https://github.com/llvm/llvm-project/commit/c4e574323210feda1a3988e85fdd93b90a63d1b1.diff LOG:

[clang] c7ec3a7 - [PowerPC] Implement Vector Extract Mask builtins in LLVM/Clang

2020-08-17 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2020-08-17T21:14:17-05:00 New Revision: c7ec3a7e338cd8e58424a66d29162e9b6a5847f7 URL: https://github.com/llvm/llvm-project/commit/c7ec3a7e338cd8e58424a66d29162e9b6a5847f7 DIFF: https://github.com/llvm/llvm-project/commit/c7ec3a7e338cd8e58424a66d29162e9b6a5847f7.diff LOG:

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -2110,6 +2110,66 @@ static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, return false; } +/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). +/// This checks that the target supports __builtin_cpu_supports and +/// that the string argum

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -2110,6 +2110,66 @@ static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, return false; } +/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). +/// This checks that the target supports __builtin_cpu_supports and +/// that the string argum

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Initial group code review comments. https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -2110,6 +2110,66 @@ static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, return false; } +/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). +/// This checks that the target supports __builtin_cpu_supports and +/// that the string argum

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
@@ -359,6 +359,13 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool isSPRegName(StringRef RegName) const override { return RegName.equals("r1") || RegName.equals("x1"); } + + // We support __builtin_cpu_supports/__builtin_cpu_is on targets that

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-08 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-13 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-13 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Additional group code review comments. https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-13 Thread Amy Kwan via cfe-commits
@@ -2110,6 +2110,66 @@ static bool checkFPMathBuiltinElementType(Sema &S, SourceLocation Loc, return false; } +/// SemaBuiltinCpuSupports - Handle __builtin_cpu_supports(char *). +/// This checks that the target supports __builtin_cpu_supports and +/// that the string argum

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-13 Thread Amy Kwan via cfe-commits
@@ -873,3 +873,17 @@ ArrayRef PPCTargetInfo::getTargetBuiltins() const { return llvm::ArrayRef(BuiltinInfo, clang::PPC::LastTSBuiltin - Builtin::FirstTSBuiltin); } + +bool PPCTargetInfo::validateCpuSupports(StringRef FeatureStr) const { --

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: I imagine this will be updated after 4b932d84f48e0f3f42c769a5ca7ce6623ab62f2e so I plan to review again after. https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -1356,6 +1382,11 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { .addExpr(SymGotTlsGD)); return; } + case PPC::GETtlsMOD32AIX: + case PPC::GETtlsMOD64AIX: +// Transform: %r3 = GETtlsMODNNAIX %r3 (for NN == 32/64). +// Into

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -231,12 +231,19 @@ class PPCTargetAsmStreamer : public PPCTargetStreamer { MCSymbolXCOFF *TCSym = cast(Streamer.getCurrentSectionOnly()) ->getQualNameSymbol(); - // On AIX, we have a region handle (symbol@m) and the variable offset - /

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -2058,6 +2089,10 @@ void PPCAIXAsmPrinter::emitLinkage(const GlobalValue *GV, } } + // Do not emit the _$TLSML symbol. + if (GVSym->getName() == "_Renamed..5f24__TLSML[TC]") amy-kwan wrote: Maybe a silly question, but will this always contain the `

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -2385,6 +2385,13 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForExternalReference( SmallString<128> Name; getNameWithPrefix(Name, GO, TM); + // AIX TLS local-dynamic requires the setting for the specific symbol name. amy-kwan wrote: Maybe

[llvm] [clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-12-06 Thread Amy Kwan via cfe-commits
@@ -145,9 +160,78 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-14 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-14 Thread Amy Kwan via cfe-commits
@@ -1830,6 +1830,10 @@ void PPCLinuxAsmPrinter::emitEndOfAsmFile(Module &M) { PPCTargetStreamer *TS = static_cast(OutStreamer->getTargetStreamer()); + if (static_cast(TM).hasGlibcHWCAPAccess()) amy-kwan wrote: Can we add more documentation regarding

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-14 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Additional group review comments. https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-14 Thread Amy Kwan via cfe-commits
@@ -32,6 +32,7 @@ class PPCTargetMachine final : public LLVMTargetMachine { std::unique_ptr TLOF; PPCABI TargetABI; Endian Endianness = Endian::NOT_DETECTED; + mutable bool HasGlibcHWCAPAccess = false; amy-kwan wrote: Question: Why does this need to be

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-15 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-15 Thread Amy Kwan via cfe-commits
@@ -1,11 +1,16 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s| FileCheck %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s | FileCheck %s \ +// RUN: --check-prefix=CHECK-X86 +// RUN: %clang_cc1 -triple ppc64le-linux-gnu -emit-llvm < %s | File

[llvm] [clang] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-15 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Additional group review comments. https://github.com/llvm/llvm-project/pull/68919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2023-11-15 Thread Amy Kwan via cfe-commits
@@ -15,38 +20,57 @@ int main(void) { if (__builtin_cpu_supports("sse4.2")) a("sse4.2"); - // CHECK: [[LOAD:%[^ ]+]] = load i32, ptr getelementptr inbounds ({ i32, i32, i32, [1 x i32] }, ptr @__cpu_model, i32 0, i32 3, i32 0) - // CHECK: [[AND:%[^ ]+]] = and i32 [[LOAD

[clang] [clang][Module] Mark test unsupported since objc doesn't have xcoff/g… (PR #70661)

2023-10-30 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/70661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4e1fe96 - Revert "[Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values"

2022-07-29 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2022-07-29T13:28:48-05:00 New Revision: 4e1fe968c9de73507a1bf0c8aa57e06be457816e URL: https://github.com/llvm/llvm-project/commit/4e1fe968c9de73507a1bf0c8aa57e06be457816e DIFF: https://github.com/llvm/llvm-project/commit/4e1fe968c9de73507a1bf0c8aa57e06be457816e.diff LOG:

[clang] dd5aa65 - [PowerPC] Implement vector bool/pixel initialization under -faltivec-src-compat=xl

2021-07-19 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2021-07-19T09:10:06-05:00 New Revision: dd5aa657a520adcff84bb6149dd20cd8a2c8c6c6 URL: https://github.com/llvm/llvm-project/commit/dd5aa657a520adcff84bb6149dd20cd8a2c8c6c6 DIFF: https://github.com/llvm/llvm-project/commit/dd5aa657a520adcff84bb6149dd20cd8a2c8c6c6.diff LOG:

[clang] 356300a - [NFC][PowerPC] Update builtins-ppc-altivec.c to be run under `-faltivec-src-compat=mixed`

2021-07-19 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2021-07-19T11:20:21-05:00 New Revision: 356300a3510c48f1f446cbdf580294b577435589 URL: https://github.com/llvm/llvm-project/commit/356300a3510c48f1f446cbdf580294b577435589 DIFF: https://github.com/llvm/llvm-project/commit/356300a3510c48f1f446cbdf580294b577435589.diff LOG:

[clang] 5dc0a16 - [PowerPC] Fix __builtin_pdepd and __builtin_pextd to be 64-bit and P10 only.

2022-02-15 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2022-02-15T12:30:50-06:00 New Revision: 5dc0a1657be14df68bfc33deb2fb75476acdaec8 URL: https://github.com/llvm/llvm-project/commit/5dc0a1657be14df68bfc33deb2fb75476acdaec8 DIFF: https://github.com/llvm/llvm-project/commit/5dc0a1657be14df68bfc33deb2fb75476acdaec8.diff LOG:

[clang] 2534dc1 - [PowerPC] Enable CR bits support for Power8 and above.

2022-05-02 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2022-05-02T12:06:15-05:00 New Revision: 2534dc120a4c9468d9a0044665a50361089f0a4d URL: https://github.com/llvm/llvm-project/commit/2534dc120a4c9468d9a0044665a50361089f0a4d DIFF: https://github.com/llvm/llvm-project/commit/2534dc120a4c9468d9a0044665a50361089f0a4d.diff LOG:

[clang] c35ca3a - [PowerPC] Implement XL compat __fnabs and __fnabss builtins.

2022-05-19 Thread Amy Kwan via cfe-commits
Author: Amy Kwan Date: 2022-05-19T11:28:40-05:00 New Revision: c35ca3a1c78f693b749ad11742350b7fc6c5cd89 URL: https://github.com/llvm/llvm-project/commit/c35ca3a1c78f693b749ad11742350b7fc6c5cd89 DIFF: https://github.com/llvm/llvm-project/commit/c35ca3a1c78f693b749ad11742350b7fc6c5cd89.diff LOG:

[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 AIX_BU

[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] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-03-20 Thread Amy Kwan via cfe-commits
amy-kwan wrote: I believe this patch is causing some issues on two PPC bots. Would you be able to help take a look? https://lab.llvm.org/buildbot/#/builders/57/builds/33601/steps/5/logs/stdio https://lab.llvm.org/buildbot/#/builders/36/builds/43759/steps/12/logs/stdio https://github.com/llvm/ll

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-03-21 Thread Amy Kwan via cfe-commits
amy-kwan wrote: > I'm confused as to how this code ever compiled in the first place... In each > case, this is C++ code that's failing: > > ``` > /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_po

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. I've also tested this locally, and it resolves the issue I saw earlier on the PPC bots. https://github.com/llvm/llvm-project/pull/86131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -4958,6 +4958,10 @@ def maix_small_local_exec_tls : Flag<["-"], "maix-small-local-exec-tls">, "where the offset from the TLS base is encoded as an " "immediate operand (AIX 64-bit only). " "This access sequence is not used for variables larg

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize heu

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize heu

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -848,6 +848,14 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSLE; if (Model == TLSModel::InitialExec) return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSIE; + // On AIX, TLS mode

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -848,6 +848,14 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSLE; if (Model == TLSModel::InitialExec) return MCSymbolRefExpr::VariantKind::VK_PPC_AIX_TLSIE; + // On AIX, TLS mode

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize heu

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize heu

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread Amy Kwan via cfe-commits
amy-kwan wrote: Thanks @AaronBallman. Not sure how I missed it, but I just noticed in my local build of check-runtimes/check-all. This is also present on the following bot: https://lab.llvm.org/buildbot/#/builders/57/builds/33656 https://github.com/llvm/llvm-project/pull/86131

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-22 Thread Amy Kwan via cfe-commits
amy-kwan wrote: I have also found one more that is not related to the sanitizers, but when `llvm-project/llvm/lib/IR/Core.cpp`: https://lab.llvm.org/buildbot/#/builders/36/builds/43840/steps/12/logs/stdio Would it be possible to also resolve this one, as well? https://github.com/llvm/llvm-pr

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-22 Thread Amy Kwan via cfe-commits
amy-kwan wrote: Thanks @Abhinkop for the patch! I have approved the compiler-rt patch since it does appear to resolve the check-runtimes/check-all issue for the asan test case. If you also would like me to test a follow up patch for `llvm-project/llvm/lib/IR/Core.cpp`, I would be happy to do

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-22 Thread Amy Kwan via cfe-commits
amy-kwan wrote: > @amy-kwan I'm looking at it now. I will most probably raise a review some > time later in the evening or tomorrow if I am not able to complete it today. Sounds good, thank you so much, @Abhinkop! https://github.com/llvm/llvm-project/pull/86131

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-25 Thread Amy Kwan via cfe-commits
amy-kwan wrote: Hi @Abhinkop! I was wondering if there was any progress regarding the patch to resolve the stage 2 failure, as our bot is still red (https://lab.llvm.org/buildbot/#/builders/36/builds/43929/steps/12/logs/stdio). Please let me know if you would also like me to test any patches, a

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-25 Thread Amy Kwan via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: amy-kwan wrote: Hi @weliveindetail! I just wanted to give a heads up, that I believe 13078cbc3eeb0ae91c370ce0f604f7165b26e0c8 is causing a failure of the clang-ppc64le-rhel bot: https://lab.llvm.org/buildbot/#/builders/57/builds/33764/step

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Amy Kwan via cfe-commits
amy-kwan wrote: This also fails on PPC, as well: https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio https://github.com/llvm/llvm-project/pull/86339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-02 Thread Amy Kwan via cfe-commits
@@ -3369,6 +3369,59 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize TLS

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

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

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-07 Thread Amy Kwan via cfe-commits
@@ -0,0 +1,83 @@ +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc970\");}" > %t.c +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %t.c | FileCheck %s \ +// RUN: --check-prefix=CHECKBOOL + +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc-cel

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-07 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,57 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of following value are found in the AIX header file +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF amy-kwan wro

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-07 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-07 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,57 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of following value are found in the AIX header file +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF +#define AIX_SYSCON_IMPL_IDX

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-07 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-07 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,57 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of following value are found in the AIX header file +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF +#define AIX_SYSCON_IMPL_IDX

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -10347,6 +10347,8 @@ def err_x86_builtin_tile_arg_duplicate : Error< def err_builtin_target_unsupported : Error< "builtin is not supported on this target">; +def err_builtin_aix_os_unsupported : Error< + "this builtin is available only in AIX 7.2 and later operating syst

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, am

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -904,8 +904,17 @@ bool PPCTargetInfo::validateCpuSupports(StringRef FeatureStr) const { } bool PPCTargetInfo::validateCpuIs(StringRef CPUName) const { + llvm::Triple Triple = getTriple(); + if (Triple.isOSLinux()) { amy-kwan wrote: Can if we do somethin

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -0,0 +1,83 @@ +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc970\");}" > %t.c +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %t.c | FileCheck %s \ +// RUN: --check-prefix=CHECKBOOL + +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc-cel

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -0,0 +1,83 @@ +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc970\");}" > %t.c +// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %t.c | FileCheck %s \ +// RUN: --check-prefix=CHECKBOOL + +// RUN: echo "int main() { return __builtin_cpu_is(\"ppc-cel

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-08 Thread Amy Kwan via cfe-commits
@@ -16542,22 +16542,75 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; +#include "llvm/TargetParser/PPCTargetParser.def" + auto GetOpRes = [&](Value *FieldValue, unsigned Mask, unsigned Op, +

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-12 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,94 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-12 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,94 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-12 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: I believe some of the test cases also require updates as a result of https://github.com/llvm/llvm-project/pull/80162. https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

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

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-12 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,94 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-12 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,94 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

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

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-23 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: I think the braces can also be omitted on the conditions within the `clang/*` files. https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-23 Thread Amy Kwan via cfe-commits
@@ -337,12 +350,77 @@ CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { return CharUnits::fromQuantity(4); } +ABIArgInfo PPC32_SVR4_ABIInfo::handleComplex(QualType Ty, + uint64_t &TypeSize) const { + + asse

  1   2   3   >