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

2024-01-11 Thread Nemanja Ivanovic 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)

2024-01-11 Thread Nemanja Ivanovic via cfe-commits
@@ -0,0 +1,80 @@ +#ifndef PPC_FEATURE nemanjai wrote: Sounds good. 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

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

2024-01-11 Thread Nemanja Ivanovic via cfe-commits
@@ -1830,6 +1830,10 @@ void PPCLinuxAsmPrinter::emitEndOfAsmFile(Module &M) { PPCTargetStreamer *TS = static_cast(OutStreamer->getTargetStreamer()); + if (static_cast(TM).hasGlibcHWCAPAccess()) nemanjai wrote: Ha ha, more as in "any"? https://github

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

2024-01-11 Thread Nemanja Ivanovic 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

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

2024-01-11 Thread Nemanja Ivanovic via cfe-commits
@@ -210,6 +210,12 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". [llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_vararg_ty], [IntrNoMem]>; + // Load of a value provided by the system library

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

2024-01-11 Thread Nemanja Ivanovic 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)

2024-01-11 Thread Nemanja Ivanovic 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; nemanjai wrote: Target machine is not modifiable wh

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

2024-01-11 Thread Nemanja Ivanovic 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)

2024-01-11 Thread Nemanja Ivanovic 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)

2024-01-11 Thread Nemanja Ivanovic 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

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

2024-01-11 Thread Nemanja Ivanovic 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][X86] Make cpu id builtins target independent and lower for PPC (PR #68919)

2024-01-11 Thread Nemanja Ivanovic 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

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

2024-01-11 Thread Nemanja Ivanovic via cfe-commits
@@ -3124,6 +3125,36 @@ bool PPCInstrInfo::expandPostRAPseudo(MachineInstr &MI) const { .addReg(Reg); return true; } + case PPC::PPCLdFixedAddr: { +assert(Subtarget.isTargetLinux() && + "Only Linux target is expected to contain PPCLdFixedAddr"); +

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

2024-01-11 Thread Nemanja Ivanovic 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

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

2024-01-11 Thread Nemanja Ivanovic 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] b7770be - [ClangFormat] Fix formatting bugs. (#76245)

2024-01-11 Thread via cfe-commits
Author: r4nt Date: 2024-01-11T13:28:45+01:00 New Revision: b7770befee37feca3d732d6daf9513c62f75c5f0 URL: https://github.com/llvm/llvm-project/commit/b7770befee37feca3d732d6daf9513c62f75c5f0 DIFF: https://github.com/llvm/llvm-project/commit/b7770befee37feca3d732d6daf9513c62f75c5f0.diff LOG: [Cl

[llvm] [clang-tools-extra] [clang] [ClangFormat] Fix formatting bugs. (PR #76245)

2024-01-11 Thread via cfe-commits
https://github.com/r4nt closed https://github.com/llvm/llvm-project/pull/76245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/77727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 40d5c2b - [clang][AArch64] Add a -mbranch-protection option to enable GCS (#75486)

2024-01-11 Thread via cfe-commits
Author: John Brawn Date: 2024-01-11T12:53:23Z New Revision: 40d5c2bcd41a534e6bab98fedf1a930d9bd165e7 URL: https://github.com/llvm/llvm-project/commit/40d5c2bcd41a534e6bab98fedf1a930d9bd165e7 DIFF: https://github.com/llvm/llvm-project/commit/40d5c2bcd41a534e6bab98fedf1a930d9bd165e7.diff LOG: [c

[llvm] [clang] [clang][AArch64] Add a -mbranch-protection option to enable GCS (PR #75486)

2024-01-11 Thread John Brawn via cfe-commits
https://github.com/john-brawn-arm closed https://github.com/llvm/llvm-project/pull/75486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/77727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AArch64][SME] Fix multi vector cvt builtins (PR #77656)

2024-01-11 Thread David Sherwood via cfe-commits
@@ -34,118 +34,118 @@ define @multi_vector_cvt_x2_bf16( %unu ; ; FCVTZS ; -define {, } @multi_vector_cvt_x2_f32_s32( %unused, %zn0, %zn1) { -; CHECK-LABEL: multi_vector_cvt_x2_f32_s32: +define {, } @multi_vector_cvt_x2_s32_f32( %unused, %zn0, %zn1) { +; CHECK-LABEL:

[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -6771,6 +6771,9 @@ def warn_pointer_sub_null_ptr : Warning< def warn_floatingpoint_eq : Warning< "comparing floating point with == or != is unsafe">, InGroup>, DefaultIgnore; +def warn_fast_floatingpoint_eq : Warning< + "explicit comparison with %0 when the program is a

[llvm] [clang] [clang-tools-extra] [flang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Yi Wu via cfe-commits
@@ -0,0 +1,206 @@ +//===-- runtime/execute.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm] [clang] [clang-tools-extra] [flang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Yi Wu via cfe-commits
@@ -0,0 +1,206 @@ +//===-- runtime/execute.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-11 Thread Zahira Ammarguellat via cfe-commits
@@ -6771,6 +6771,9 @@ def warn_pointer_sub_null_ptr : Warning< def warn_floatingpoint_eq : Warning< "comparing floating point with == or != is unsafe">, InGroup>, DefaultIgnore; +def warn_fast_floatingpoint_eq : Warning< + "explicit comparison with %0 when the program is a

[clang] [AArch64][SME2] Fix SME2 mla/mls tests (PR #76711)

2024-01-11 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/76711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-11 Thread via cfe-commits
zmodem wrote: > > What does the code that reads these files look like, could we leverage that > > somehow? > > You can call `clang::ObjectFilePCHContainerReader::ExtractPCH()` and then > check the magic. This lives in the CodeGen library which I don't think the > driver currently (or should)

[clang-tools-extra] [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum (PR #77766)

2024-01-11 Thread Tom Praschan via cfe-commits
https://github.com/tom-anders created https://github.com/llvm/llvm-project/pull/77766 Relevant issue: https://github.com/clangd/clangd/issues/1361 The problem here was that writing something like `using ns::ScopedEnum` does not cause Sema to visit this scope, to it won't be added into `CodeCo

[clang-tools-extra] [clangd] Fix qualifier not being dropped for using declaration referring to scoped enum (PR #77766)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Tom Praschan (tom-anders) Changes Relevant issue: https://github.com/clangd/clangd/issues/1361 The problem here was that writing something like `using ns::ScopedEnum` does not cause Sema to visit this scope, to it won't be added into `C

[clang] [clang][ExtractAPI] Add support C unions in non C++ parsing mode (PR #77451)

2024-01-11 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg updated https://github.com/llvm/llvm-project/pull/77451 >From 9ed6ab49d39df12b95c65d48d065e82672dba48f Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Tue, 9 Jan 2024 12:06:14 + Subject: [PATCH] [clang][ExtractAPI] Add support C unions in non C++ pars

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/77768 Closes #77638, #24186 Rebased from , see there for more information. Implements wording change in [CWG2137](https://wg21.link/CWG2137) in the first commit. This also implem

[clang-tools-extra] [clang] [flang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm edited https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-libcxx Author: Mital Ashok (MitalAshok) Changes Closes #77638, #24186 Rebased from ;, see there for more information. Implements wording change in [CWG2137](https://wg21.link/CWG2137) in the

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-11 Thread Leandro Lupori via cfe-commits
https://github.com/luporl closed https://github.com/llvm/llvm-project/pull/77365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9edcf7a - [flang][driver] Add support for -isysroot in the frontend (#77365)

2024-01-11 Thread via cfe-commits
Author: Leandro Lupori Date: 2024-01-11T10:37:58-03:00 New Revision: 9edcf7a28eee1e3b2d22bd3aed9e405e17beacce URL: https://github.com/llvm/llvm-project/commit/9edcf7a28eee1e3b2d22bd3aed9e405e17beacce DIFF: https://github.com/llvm/llvm-project/commit/9edcf7a28eee1e3b2d22bd3aed9e405e17beacce.diff

[clang] [flang] [flang] Fix fveclib on Darwin (PR #77605)

2024-01-11 Thread Leandro Lupori via cfe-commits
luporl wrote: Thanks for the reviews! https://github.com/llvm/llvm-project/pull/77605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [flang] [clang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm edited https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [flang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm edited https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f1c88d7 - [flang] Fix fveclib on Darwin (#77605)

2024-01-11 Thread via cfe-commits
Author: Leandro Lupori Date: 2024-01-11T10:39:53-03:00 New Revision: f1c88d7c6f7698e4c51cb34754bb3177db9dc704 URL: https://github.com/llvm/llvm-project/commit/f1c88d7c6f7698e4c51cb34754bb3177db9dc704 DIFF: https://github.com/llvm/llvm-project/commit/f1c88d7c6f7698e4c51cb34754bb3177db9dc704.diff

[clang] [flang] [flang] Fix fveclib on Darwin (PR #77605)

2024-01-11 Thread Leandro Lupori via cfe-commits
https://github.com/luporl closed https://github.com/llvm/llvm-project/pull/77605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-11 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification. M

[clang] [llvm] [AArch64][SME] Fix multi vector cvt builtins (PR #77656)

2024-01-11 Thread Matthew Devereau via cfe-commits
@@ -34,118 +34,118 @@ define @multi_vector_cvt_x2_bf16( %unu ; ; FCVTZS ; -define {, } @multi_vector_cvt_x2_f32_s32( %unused, %zn0, %zn1) { -; CHECK-LABEL: multi_vector_cvt_x2_f32_s32: +define {, } @multi_vector_cvt_x2_s32_f32( %unused, %zn0, %zn1) { +; CHECK-LABEL:

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -2288,10 +2288,11 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) { ForRangeStmt = Actions.ActOnCXXForRangeStmt( getCurScope(), ForLoc, CoawaitLoc, FirstPart.get(), ForRangeInfo.LoopVar.get(), ForRangeInfo.ColonLoc, CorrectedRan

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -2783,6 +2789,7 @@ StmtResult Sema::BuildCXXForRangeStmt(SourceLocation ForLoc, LoopVar->setType(SubstAutoTypeDependent(LoopVar->getType())); } } else if (!BeginDeclStmt.get()) { + AaronBallman wrote: Spurious whitespace change can be removed.

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -6289,9 +6289,19 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, ImmediateCallVisitor V(getASTContext()); if (!NestedDefaultChecking) V.TraverseDecl(Param); -if (V.HasImmediateCalls) { - ExprEvalContexts.back().DelayedDefaultInitial

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/76361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -2539,6 +2539,12 @@ StmtResult Sema::ActOnCXXForRangeStmt(Scope *S, SourceLocation ForLoc, return StmtError(); } + if (getLangOpts().CPlusPlus23) { +auto Entity = InitializedEntity::InitializeVariable(RangeVar); AaronBallman wrote: Please spell

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -6305,6 +6315,10 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, if (Res.isInvalid()) return ExprError(); Init = Res.get(); + + // Collect MaterializeTemporaryExprs in the rewrited CXXDefaultArgExpr. AaronBallman

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! I think it looks pretty close, but I'd love to get more eyes on this given the importance of the feature. CC @zygoloid @rjmccall @erichkeane https://github.com/llvm/llvm-project/pull/76361 _

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -8244,11 +8229,33 @@ ExprResult Sema::IgnoredValueConversions(Expr *E) { // If the expression is a prvalue after this optional conversion, the // temporary materialization conversion is applied. // -// We skip this step: IR generation is able to synthesiz

[lld] [libcxx] [openmp] [llvm] [clang] [lto] Add minimum macos sdk requirement to test (PR #77695)

2024-01-11 Thread Florian Hahn via cfe-commits
fhahn wrote: Hmmm, did you try this with a newer SDK to confirm it works as expected or is possible that it now just doesn't run? Do you know what SDK version the failing system has? The option handling is done by `libLTO` built from source, so I'd be surprised if that doesn't get passed thro

[llvm] [flang] [lld] [compiler-rt] [lldb] [libunwind] [mlir] [clang-tools-extra] [clang] [openmp] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/77608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Tom Eccles via cfe-commits
@@ -0,0 +1,206 @@ +//===-- runtime/execute.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm] [clang] [AArch64][SME] Fix multi vector cvt builtins (PR #77656)

2024-01-11 Thread Matthew Devereau via cfe-commits
@@ -34,118 +34,118 @@ define @multi_vector_cvt_x2_bf16( %unu ; ; FCVTZS ; -define {, } @multi_vector_cvt_x2_f32_s32( %unused, %zn0, %zn1) { -; CHECK-LABEL: multi_vector_cvt_x2_f32_s32: +define {, } @multi_vector_cvt_x2_s32_f32( %unused, %zn0, %zn1) { +; CHECK-LABEL:

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-11 Thread Erich Keane via cfe-commits
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr { let Documentation = [M68kRTDDocs]; } +def PreserveNone : DeclOrTypeAttr { + let Spellings = [Clang<"preserve_none">]; erichkeane wrote: The second example there is a function pointer, not a function you'

[clang-tools-extra] [clang] [flang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Yi Wu via cfe-commits
@@ -0,0 +1,206 @@ +//===-- runtime/execute.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)

2024-01-11 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm edited https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. I think all the comments made on phab have been applied, and I do believe this implements the DRs (or their intent) Please give a few days for other folks to look at it before merging. @zygoloid in particular as he opened CW2311 https://g

[clang] [llvm] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-11 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/77023 >From ddecbda9f079584a55feed322d8d20b766349ab9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 Jan 2024 22:07:31 + Subject: [PATCH 1/2] [VPlan] Introduce VPSingleDefRecipe. This patch introduces a new

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread via cfe-commits
cor3ntin wrote: @mordante ping for visibility (you approved that on Phab already) https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-11 Thread Piotr Sobczak via cfe-commits
https://github.com/piotrAMD created https://github.com/llvm/llvm-project/pull/2 Support new amdgcn_global_load_tr instructions for load with transpose. * MC layer support for GLOBAL_LOAD_TR_B64/GLOBAL_LOAD_TR_B128 * Intrinsics int_amdgcn_global_load_tr_b64/int_amdgcn_global_load_tr_b128 * C

[lldb] [clang-tools-extra] [mlir] [compiler-rt] [llvm] [libunwind] [flang] [lld] [clang] [openmp] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
https://github.com/HaohaiWen closed https://github.com/llvm/llvm-project/pull/77608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Add global_load_tr for GFX12 (PR #77772)

2024-01-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-clang-codegen Author: Piotr Sobczak (piotrAMD) Changes Support new amdgcn_global_load_tr instructions for load with transpose. * MC layer support for GLOBAL_LOAD_TR_B64/GLOBAL_LOAD_TR_B128 * Intrinsics int_amdgcn_global_load

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -2868,6 +2868,11 @@ def M68kRTD: DeclOrTypeAttr { let Documentation = [M68kRTDDocs]; } +def PreserveNone : DeclOrTypeAttr { + let Spellings = [Clang<"preserve_none">]; AaronBallman wrote: Calling conventions are somewhat odd in the attribute system, so

[clang-tools-extra] [clang] [lldb] [compiler-rt] [lld] [flang] [openmp] [mlir] [llvm] [libunwind] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: llc -mtriple=x86_64-pc-windows-msvc %s dyung wrote: This RUN line seems to leave a .s file around that causes failures in subsequent runs: https://lab.llvm.org/buildbot/#/builders/139/builds/56922 ``` TEST 'LLVM :: C

[clang-tools-extra] [clang] [llvm] [AMDGPU][GFX12] Default component broadcast store (PR #76212)

2024-01-11 Thread Mariusz Sikora via cfe-commits
https://github.com/mariusz-sikora-at-amd updated https://github.com/llvm/llvm-project/pull/76212 >From 06117c6124e94953f62eff3b1b87d98146f9e25e Mon Sep 17 00:00:00 2001 From: Mateja Marjanovic Date: Wed, 10 May 2023 16:24:38 +0200 Subject: [PATCH 1/2] [AMDGPU][GFX12] Default component broadcast

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin commented: Overall, I think this looks good. Afaict the whole paper is implemented. https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -1722,12 +1722,19 @@ static bool CheckConstexprDestructorSubobjects(Sema &SemaRef, return true; if (Kind == Sema::CheckConstexprKind::Diagnose) { - SemaRef.Diag(DD->getLocation(), diag::err_constexpr_dtor_subobject) + SemaRef.Diag(DD->getLocation(), +

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -1767,10 +1780,16 @@ static bool CheckConstexprParameterTypes(Sema &SemaRef, /// true. If not, produce a suitable diagnostic and return false. static bool CheckConstexprReturnType(Sema &SemaRef, const FunctionDecl *FD, Sema::CheckConstexp

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -165,6 +165,8 @@ C++23 Feature Support - Added a separate warning to warn the use of attributes on lambdas as a C++23 extension in previous language versions: ``-Wc++23-lambda-attributes``. +- Implemented `P2448R2: Relaxing some constexpr restrictions

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread via cfe-commits
@@ -1754,11 +1761,17 @@ static bool CheckConstexprParameterTypes(Sema &SemaRef, const ParmVarDecl *PD = FD->getParamDecl(ArgIndex); assert(PD && "null in a parameter list"); SourceLocation ParamLoc = PD->getLocation(); -if (CheckLiteralType(SemaRef, Kind, ParamL

[clang-tools-extra] [llvm] [clang] [AMDGPU][GFX12] Default component broadcast store (PR #76212)

2024-01-11 Thread Mariusz Sikora via cfe-commits
mariusz-sikora-at-amd wrote: Merge with upstream to run tests. I will merge this changes if CI will pass. https://github.com/llvm/llvm-project/pull/76212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[llvm] [clang] [AArch64][SME] Fix multi vector cvt builtins (PR #77656)

2024-01-11 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/77656 >From 67be98b05d771dabe11af54b69532641fa548fb1 Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Wed, 10 Jan 2024 17:58:30 + Subject: [PATCH 1/3] [AArch64][SME] Fix multi vector cvt builtins This fixes cv

[llvm] [clang] [AArch64][SME] Fix multi vector cvt builtins (PR #77656)

2024-01-11 Thread Sander de Smalen via cfe-commits
@@ -34,118 +34,118 @@ define @multi_vector_cvt_x2_bf16( %unu ; ; FCVTZS ; -define {, } @multi_vector_cvt_x2_f32_s32( %unused, %zn0, %zn1) { -; CHECK-LABEL: multi_vector_cvt_x2_f32_s32: +define {, } @multi_vector_cvt_x2_s32_f32( %unused, %zn0, %zn1) { +; CHECK-LABEL:

[llvm] [clang] [clang-tools-extra] [VPlan] Introduce VPSingleDefRecipe. (PR #77023)

2024-01-11 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/77023 >From ddecbda9f079584a55feed322d8d20b766349ab9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 Jan 2024 22:07:31 + Subject: [PATCH 1/3] [VPlan] Introduce VPSingleDefRecipe. This patch introduces a new

[flang] [llvm] [clang] [clang-tools-extra] [libcxx] [libc] [compiler-rt] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-11 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov edited https://github.com/llvm/llvm-project/pull/76449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12 #endif } +namespace dr2137 { // dr2137: 18 +#if __cplusplus >= 201103L + struct Q { +Q(); +Q(Q&&); +Q(std::initializer_list) = delete; // expected-note 2 {{has been explicitly marked deleted here}} + }; + +

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-11 Thread Louis Dionne via cfe-commits
ldionne wrote: No, I would like to reproduce locally. https://github.com/llvm/llvm-project/pull/75841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [lldb] [lld] [clang] [llvm] [clang-tools-extra] [libclc] [libunwind] [libcxx] [libc] [compiler-rt] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77444 >From 1cbf8eec15112cd6871fcfb69425c62f08c8f681 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Jan 2024 14:17:21 +0300 Subject: [PATCH 1/4] [clang] Add tests for DRs about complete-class context MI

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-01-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/70307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -x c -fsyntax-only -verify -Wshift-count-negative %s +// RUN: %clang_cc1 -x c -fsyntax-only -verify -Wall %s +// RUN: %clang_cc1 -x c++ -fsyntax-only -verify -Wshift-count-negative %s +// RUN: %clang_cc1 -x c++ -fsyntax-only -verify -Wall %s + +

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-01-11 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The patch summary doesn't really explain why the changes are needed. Can you explain what problem you're solving (perhaps link to an issue if this is fixing one that was reported by someone)? https://github.com/llvm/llvm-project/pull/70307 ___

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -2803,9 +2803,10 @@ static bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, // C++11 [expr.shift]p1: Shift width must be less than the bit width of // the shifted type. unsigned SA = (unsigned) RHS.getLimitedValue(LHS.getBitWidth()-1); -

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -x c -fsyntax-only -verify -Wshift-negative-value %s +// RUN: %clang_cc1 -x c -fsyntax-only -verify -Wall %s +// RUN: %clang_cc1 -x c++ -fsyntax-only -verify -Wshift-negative-value %s +// RUN: %clang_cc1 -x c++ -fsyntax-only -verify -Wall %s + +

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -2836,9 +2837,11 @@ static bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, // C++11 [expr.shift]p1: Shift width must be less than the bit width of the // shifted type. unsigned SA = (unsigned) RHS.getLimitedValue(LHS.getBitWidth()-1); -

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-01-11 Thread Aaron Ballman via cfe-commits
@@ -426,7 +426,7 @@ void dr081(void) { /* Demonstrate that we don't crash when left shifting a signed value; that's * implementation defined behavior. */ - _Static_assert(-1 << 1 == -2, "fail"); /* Didn't shift a zero into the "sign bit". */ + _Static_assert(-1 << 1 ==

[clang] [clang-tools-extra] [flang] [llvm] [flang] GETLOG runtime and extension implementation: get login username (PR #74628)

2024-01-11 Thread Rainer Orth via cfe-commits
rorth wrote: Sure: I've just created one slightly changed from the attached patch: [[flang] Handle missing LOGIN_NAME_MAX definition in runtime](https://github.com/llvm/llvm-project/pull/5) https://github.com/llvm/llvm-project/pull/74628 ___ cfe-

[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

2024-01-11 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/77699 >From ff055d9c064d1fb359d59eeb47cb5f8c6c422bec Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Fri, 7 Jul 2023 17:28:47 -0600 Subject: [PATCH 1/3] Fix formatting of if statements with BlockIndent A bug with Blo

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-11 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066 >From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 5 Jan 2024 10:11:20 +0100 Subject: [PATCH 1/4] [coroutines] Detect lifetime issues with coroutine lambda captu

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-11 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 86ef039220de4b7d2e2f1d5e93874ae7a242730e 4c05d54e07d4f650bf5694a3ddc365078b854627 --

[mlir] [llvm] [openmp] [compiler-rt] [libcxxabi] [lld] [libcxx] [clang] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-11 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/77687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [lld] [libcxx] [openmp] [mlir] [libc++] Deprecate the _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS macro (PR #77692)

2024-01-11 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/77692 >From 6b3fd86a9949458410895a2292db935665a2ab77 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 10 Jan 2024 15:23:47 -0500 Subject: [PATCH 1/2] [libc++] Deprecate the _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-11 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/77066 >From 3e0d0ab6c4fc6cba68285816a95e423bc18e8e55 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 5 Jan 2024 10:11:20 +0100 Subject: [PATCH 1/5] [coroutines] Detect lifetime issues with coroutine lambda captu

[openmp] [clang-tools-extra] [lldb] [lld] [flang] [mlir] [libunwind] [compiler-rt] [llvm] [clang] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: llc -mtriple=x86_64-pc-windows-msvc %s dyung wrote: @HaohaiWen Could you restructure this test so that it doesn't generate the .s file (maybe redirect the output to /dev/null or something similar?) This is causing unresolved test errors

[libcxxabi] [libc] [libcxx] [clang-tools-extra] [lldb] [mlir] [flang] [lld] [libunwind] [compiler-rt] [llvm] [clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [lldb] [flang] [llvm] [libunwind] [clang-tools-extra] [compiler-rt] [libcxxabi] [lld] [libcxx] [libc] [clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-11 Thread via cfe-commits
https://github.com/cor3ntin commented: Just a few nits, but I think it looks good https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >