[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Changpeng Fang via cfe-commits
@@ -5354,6 +5368,22 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const { } case Intrinsic::amdgcn_pops_exiting_wave_id: return getDefaultMappingSOP(MI); +case Intrinsic::amdgcn_tensor_load_to_lds_d2: +case Intrinsic::amdgcn_tensor_st

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-02 Thread Sean McBride via cfe-commits
seanm wrote: Another interesting case: ```c++ static int testToWindowsExtendedPath() { #ifdef _WIN32 // lots of real, non constant work return ret; #else return 0; #endif } ``` For some platforms this can be constexpr; for other platforms (Windows), it cannot. It was transformed to `cons

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-02 Thread John McCall via cfe-commits
rjmccall wrote: Right, but the code still contains some kind of check to decide which version of the library function to call. Maybe it's implicit by multiversioned functions or something, but there's *something* in the source code, because if the user just writes a kernel that does nothing bu

[clang] [Clang] Fix clang crash for fopenmp statement(parallel for) inside lambda function (PR #146772)

2025-07-02 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta edited https://github.com/llvm/llvm-project/pull/146772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Consistently handle consteval constructors for variables. (PR #144970)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-02 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/146224 >From 43e2dc670d7c9ed5e23b5d26dff1e273c84b5a53 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 3 Jul 2025 02:15:22 +0800 Subject: [PATCH] [C23][Parser] Diagnostic for attribute declaration where statement i

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-02 Thread Alon Zakai via cfe-commits
Lukas =?utf-8?q?Döllerer?= , Lukas =?utf-8?q?Döllerer?= , Lukas =?utf-8?q?Döllerer?= Message-ID: In-Reply-To: kripken wrote: @Lukasdoe You may be interested in this Binaryen PR which adds passes for branch hint debugging: https://github.com/WebAssembly/binaryen/pull/7695 For example you cou

[clang] [clang-tools-extra] [clang-tidy] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-07-02 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/145784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread via cfe-commits
https://github.com/Sirraide commented: One more thing I thought of: What about C++ edge cases, e.g. both Clang and GCC accept this... which doesn’t quite seem right to me (https://godbolt.org/z/K58eEvG9P): ```c++ typeof(int){} x; // Probably parsed as typeof(int{}) ``` https://github.com/llvm/

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread via cfe-commits
@@ -1000,8 +1001,10 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind, Token Replacement; CastExpressionIdValidator Validator( /*Next=*/Tok, -/*AllowTypes=*/isTypeCast != TypeCastState::NotTypeCast, -/*AllowNonTypes=*/isTypeCast

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Changpeng Fang via cfe-commits
@@ -3580,6 +3580,37 @@ def int_amdgcn_fdiv_fast : DefaultAttrsIntrinsic< [IntrNoMem, IntrSpeculatable] >; +class AMDGPUTensorLoadStore: + Intrinsic< +[], +[llvm_v4i32_ty, // D# group 0 + llvm_v8i32_ty, // D# group 1 + llvm_v4i32_ty, // D# group 2 + llvm_

[clang] [CIR] Upstream SubstNonTypeTemplateParmExpr support for ComplexType (PR #146755)

2025-07-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/146755 >From ba1109f6c42bc902d9dc1f0613ce0b4959e8233e Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 2 Jul 2025 20:26:39 +0200 Subject: [PATCH] [CIR] Upstream SubstNonTypeTemplateParmExpr support for Comp

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Changpeng Fang via cfe-commits
@@ -621,6 +621,32 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Function *F = CGM.getIntrinsic(IID, {LoadTy}); return Builder.CreateCall(F, {Addr}); } + case AMDGPU::BI__builtin_amdgcn_tensor_load_to_lds: + case AMDGPU::BI__builtin_amdg

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/146394 >From 94cd71d65fe27cdde0c39416a0e2e709af98ed0c Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 30 Jun 2025 13:26:57 -0400 Subject: [PATCH 1/3] [C23] Fix typeof handling in enum declarations We have

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-07-02 Thread via cfe-commits
sivadeilra wrote: @arsenm, @efriedma-quic, @namazso , do you have more feedback on this PR? I'd like to get this merged and move on to the next pieces for supporting Windows hot-patching. https://github.com/llvm/llvm-project/pull/144745 ___ cfe-comm

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread Aaron Ballman via cfe-commits
@@ -4210,6 +4215,7 @@ class Parser : public CodeCompletionHandler { /// \endverbatim ExprResult ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, bool isTypeCast, + bool ParenKnownToBeNon

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread Aaron Ballman via cfe-commits
@@ -2850,7 +2870,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, isFoldOperator(NextToken().getKind())) { ExprType = ParenParseOption::FoldExpr; return ParseFoldExpression(ExprResult(), T); - } else if (isTypeCast) { +

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 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 HEAD~1 HEAD --extensions h,cpp,c -- clang/include/clang/Parse/Parser.h clang/lib/Pars

[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

2025-07-02 Thread Sean McBride via cfe-commits
seanm wrote: > > This actually compiles, though with a `-Wduplicate-decl-specifier` warning. > > I failed to reproduce this... I don't have a minimal repro case, I was building [VTK](https://gitlab.kitware.com/vtk/vtk). It's pretty simple to build it yourself if you're familiar with CMake. I

[clang] [clang-tools-extra] [clang-tidy] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-07-02 Thread Baranov Victor via cfe-commits
@@ -292,6 +292,21 @@ class ClangTidyDiagnosticConsumer : public DiagnosticConsumer { void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override; + void BeginSourceFile(const LangOptions &LangOpts, vbv

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Tim Gymnich via cfe-commits
@@ -5354,6 +5368,22 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const { } case Intrinsic::amdgcn_pops_exiting_wave_id: return getDefaultMappingSOP(MI); +case Intrinsic::amdgcn_tensor_load_to_lds_d2: +case Intrinsic::amdgcn_tensor_st

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Tim Gymnich via cfe-commits
https://github.com/tgymnich edited https://github.com/llvm/llvm-project/pull/146636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Replace a function with StringRef::contains (PR #146245)

2025-07-02 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > While it is less code, I find a bit harder to understand and the code gen > > is far worse: https://gcc.godbolt.org/z/KzG4YnTh3 > > `IsBlank` is misleading because of `std::isblank` whereas `Blanks.contains` > is not, so the latter has better readability for me. A

[clang] [Clang] Fix clang crash for fopenmp statement(parallel for) inside lambda function (PR #146772)

2025-07-02 Thread Alexey Bataev via cfe-commits
@@ -2332,6 +2332,12 @@ void CodeGenFunction::EmitOMPPrivateLoopCounters( for (const Expr *E : S.counters()) { const auto *VD = cast(cast(E)->getDecl()); const auto *PrivateVD = cast(cast(*I)->getDecl()); +// Privatize original counter variable (e.g., __beginN, __e

[clang] [Clang] Fix clang crash for fopenmp statement(parallel for) inside lambda function (PR #146772)

2025-07-02 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,419 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --clang-args ['-fopenmp', '-std=c++20'] --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]

[clang] [llvm] [RISCV] Add big-endian support to RISC-V backend (PR #146534)

2025-07-02 Thread Sam Elliott via cfe-commits
lenary wrote: What is your intention here around the LLVM 21 release cycle, knowing this is a big feature and we are 1 week from the branch date https://github.com/llvm/llvm-project/pull/146534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-02 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > So your users today are building for generic AMDGPU but using builtins that > are only available on a specific processor release? Presumably that code is > protected _somehow_ and their programs are not simply crashing at runtime. Is > that something you'd be able to leverage

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/144970 >From b1f7402423af22b0ea8cdf0b3d3734bcce68a636 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 19 Jun 2025 18:29:49 -0700 Subject: [PATCH 1/2] [clang] Consistently handle consteval constructors for

[clang] [clang-tools-extra] [clang-tidy] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-07-02 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple approved this pull request. I want to check that my mental model of InSourceFile is correct but otherwise LGTM. https://github.com/llvm/llvm-project/pull/145784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [clang-tools-extra] [clang-tidy] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-07-02 Thread Jan Korous via cfe-commits
@@ -292,6 +292,21 @@ class ClangTidyDiagnosticConsumer : public DiagnosticConsumer { void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) override; + void BeginSourceFile(const LangOptions &LangOpts, +

[clang] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-02 Thread Eric Li via cfe-commits
https://github.com/tJener created https://github.com/llvm/llvm-project/pull/146761 Before this commit, when `LineJoiner` joins a line with affected leading whitespace, it would drop the knowledge of this entirely. However, when the `AffectedRangeManager` is computing the affected lines, the le

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/146394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread via cfe-commits
Sirraide wrote: > > ```c++ > > typeof(int){} x; // Probably parsed as typeof(int{}) > > ``` > > Actually, I’m not sure what we think this is supposed to be; I haven’t > checked. Actually, that’s just a compound literal; I forgot we supported those in C++. https://github.com/llvm/llvm-project/

[clang] [clang-tools-extra] [clang-tidy] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-07-02 Thread Dave Bartolomeo via cfe-commits
https://github.com/dbartol updated https://github.com/llvm/llvm-project/pull/145784 >From 0be65986e1e2adf973a032936afa9cf48841055b Mon Sep 17 00:00:00 2001 From: Dave Bartolomeo Date: Wed, 25 Jun 2025 17:45:50 -0400 Subject: [PATCH 1/3] EndSourceFile() for preprocessor before diagnostic client

[clang] [clang] Refactor `LangOptions` to specify AST effect as X macro arg (PR #146766)

2025-07-02 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/146766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 551d6dd - [clang] [test] Add a missing requirement for a test

2025-07-02 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2025-07-02T23:58:22+03:00 New Revision: 551d6ddaa3810749ecae33f65759870b78b9a86a URL: https://github.com/llvm/llvm-project/commit/551d6ddaa3810749ecae33f65759870b78b9a86a DIFF: https://github.com/llvm/llvm-project/commit/551d6ddaa3810749ecae33f65759870b78b9a86a.diff

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: I pushed a fix to add `REQUIRES: x86-registered-target` in 551d6ddaa3810749ecae33f65759870b78b9a86a. https://github.com/llvm/llvm-project/pull/146643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-02 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > we only know the concrete target when we are finalising, which happens at a > completely different time-point, on possibly a different machine; This is precisely why we want the frontend diagnostic: if we diagnose the bad cases in the frontend, later stages are guarantee

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-02 Thread Eli Friedman via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/137163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-02 Thread Cristian Assaiante via cfe-commits
https://github.com/cristianassaiante updated https://github.com/llvm/llvm-project/pull/145059 >From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001 From: Cristian Assaiante Date: Fri, 20 Jun 2025 16:56:23 +0200 Subject: [PATCH 1/7] Adding -opt-disable and a test for it --- c

<    1   2   3   4   5