[clang] [llvm] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX/AVX512 subvector extraction intrinsics to be used in constexpr #157712 (PR #158853)

2025-10-13 Thread Simon Pilgrim via cfe-commits
@@ -678,6 +678,30 @@ static bool interp__builtin_popcount(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_parity(InterpState &S, CodePtr OpPC, + const InterpFrame *Frame, + const C

[clang] Sort attributes according to source position before printing (PR #162556)

2025-10-13 Thread Giuliano Belinassi via cfe-commits
giulianobelinassi wrote: > Can we use ~`llvm::partition`~ `llvm::stable_partition` to split `Attrs` into > two parts by `.isValid()` so that we can use `llvm::sort`? > > Please add a release note entry to clang/docs/ReleaseNotes.rst so that users > can know the improvement. I am not sure this

[clang] [llvm] [LifetimeSafety] Reorganize code into modular components (PR #162474)

2025-10-13 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/162474 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][x86][bytecode] Replace interp__builtin_parity/clrsb/bitreverse/ffs with static bool interp__builtin_elementwise_int_unaryop callback (PR #162346)

2025-10-13 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/162346 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-10-13 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I've cleaned things up and separated-out the C++-11-only rule-set into a new PR for a more incremental review and merge here: #162741 - dropped support for declarations of multiple variables in one statement - hopefully addressed all outstanding review comments https://github.c

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add SSE/AVX VPTEST/VTESTPD/VTESTPS intrinsics to be used in constexpr (PR #160428)

2025-10-13 Thread Simon Pilgrim via cfe-commits
@@ -2009,90 +2009,136 @@ int test_mm_testc_pd(__m128d A, __m128d B) { // CHECK: call {{.*}}i32 @llvm.x86.avx.vtestc.pd(<2 x double> %{{.*}}, <2 x double> %{{.*}}) return _mm_testc_pd(A, B); } +TEST_CONSTEXPR(_mm_testc_pd((__m128d)(__v2df){-1.0, -2.0},(__m128d)(__v2df){-3.

[libcxx] [libcxxabi] [libunwind] [libcxx] Use %{temp} instead of %T (PR #162323)

2025-10-13 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/162323 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC][AIX] Specify correct ABI alignment for double (PR #144673)

2025-10-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/144673 >From c69372599c7ddccad3db078d17a65d29b3666f95 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 11 Jun 2025 11:17:53 +0200 Subject: [PATCH 1/2] [PowerPC][AIX] Specify correct ABI alignment for double Add `f

[clang] [clang-format] Remove special handling of comments after brace/paren (PR #71672)

2025-10-13 Thread Björn Schäpers via cfe-commits
@@ -1474,12 +1474,12 @@ TEST_F(FormatTestComments, CommentsInStaticInitializers) { verifyFormat("S s = {{a, b, c}, // Group #1\n" " {d, e, f}, // Group #2\n" " {g, h, i}}; // Group #3"); - verifyFormat("S s = {{// Group #1\n" -

[clang] [clang] Fix inconsistencies with the device_kernel attr on different targets (PR #161905)

2025-10-13 Thread Tom Honermann via cfe-commits
tahonermann wrote: > Joseph's suggestion seems the best to me, having one of the aliases have > totally different semantics is just asking for trouble. If @tahonermann > agrees I'll update this PR to implement that. Yes, please. Enablement of the `sycl_kernel` attribute is already subject to

[clang] [Clang] Add __builtin_bswapg (PR #162433)

2025-10-13 Thread Timm Baeder via cfe-commits
@@ -3288,7 +3288,15 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call, case Builtin::BI__builtin_elementwise_ctzg: return interp__builtin_elementwise_countzeroes(S, OpPC, Frame, Call, BuiltinID)

[clang] [clang][CodeGen] Remove "unsafe-fp-math" attribute support (PR #162779)

2025-10-13 Thread via cfe-commits
https://github.com/paperchalice closed https://github.com/llvm/llvm-project/pull/162779 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-10-13 Thread via cfe-commits
@@ -0,0 +1,72 @@ +.. title:: clang-tidy - modernize-use-constexpr + +modernize-use-constexpr +=== + +Finds functions and variables that can be declared ``constexpr``. + +This check currently supports the ``constexpr`` rule-set of C++11. + +The check analyses an

[clang] [Driver] Remove special handling for older Ubuntu (PR #162518)

2025-10-13 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/162518 Releases of Ubuntu that do not support the GNU hash style are long unsupported. >From b93c418279e12131e2368d82df9153f5807ab7ba Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 8 Oct 2025 13:41:08 -0400 Subjec

[clang] Fix use of funified-lto and save-temps flags together (PR #162763)

2025-10-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alexey Bader (bader) Changes > clang -flto -funified-lto -save-temps test.c Fails with the following error message: ```bash module flag identifiers must be unique (or of 'require' type) !"UnifiedLTO" fatal error: error in backend:

[clang] [OpenACC][CIR] Implement 'reduction' combiner lowering for 5 ops (PR #162906)

2025-10-13 Thread Andy Kaylor via cfe-commits
@@ -527,16 +527,140 @@ void OpenACCRecipeBuilderBase::createFirstprivateRecipeCopy( // doesn't restore it aftewards. void OpenACCRecipeBuilderBase::createReductionRecipeCombiner( mlir::Location loc, mlir::Location locEnd, mlir::Value mainOp, -mlir::acc::ReductionRecipe

[clang-tools-extra] [NFC][clang-tidy] Fix potential constant overflow (PR #162647)

2025-10-13 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/162647 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][RISCV] Rename `getRISCFeaturesFromMcpu`. NFCI (PR #162545)

2025-10-13 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/162545 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1b627da - [CIR] Call base class destructors (#162562)

2025-10-13 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-10-09T11:19:57-07:00 New Revision: 1b627da8cfb6188c5bcf3f9a3bd35501387a462b URL: https://github.com/llvm/llvm-project/commit/1b627da8cfb6188c5bcf3f9a3bd35501387a462b DIFF: https://github.com/llvm/llvm-project/commit/1b627da8cfb6188c5bcf3f9a3bd35501387a462b.diff L

[clang] [llvm] [clang] Introduce CallGraphSection codegen option (PR #117037)

2025-10-13 Thread Prabhu Rajasekaran via cfe-commits
Prabhuk wrote: @arsenm -- The patches that precede this change in llvm have landed. I am planning to land this early next week if there are no objections. https://github.com/llvm/llvm-project/pull/117037 ___ cfe-commits mailing list cfe-commits@lists.

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

2025-10-13 Thread via cfe-commits
@@ -0,0 +1,72 @@ +.. title:: clang-tidy - modernize-use-constexpr + +modernize-use-constexpr +=== + +Finds functions and variables that can be declared ``constexpr``. + +This check currently supports the ``constexpr`` rule-set of C++11. + +The check analyses an

[clang] [C2y] Claim support for WG14 N3623 (PR #162843)

2025-10-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/162843 This requires invalid signatures of main to be diagnosed while still allowing for common extensions. Clang has always supported this. >From 67b3435b81d2f0f3c6f1d7bf92eea98e1ee90d02 Mon Sep 17 00:00:00 2001

[clang] [libcxx] [clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2025-10-13 Thread Louis Dionne via cfe-commits
ldionne wrote: Let's give a real name to this test file. https://github.com/llvm/llvm-project/pull/78707 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [llvm] [clang][docs] Update doc and release note for probe instrumentation (PR #162606)

2025-10-13 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/162606 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Mark vector intrinsics speculatable (PR #162334)

2025-10-13 Thread Nikita Popov via cfe-commits
@@ -10,30 +10,30 @@ // CHECK-C-SAME: i32 noundef [[SLICE_BASE:%.*]], [[PG:%.*]], ptr noundef [[PTR:%.*]], i64 noundef [[VNUM:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { // CHECK-C-NEXT: entry: // CHECK-C-NEXT:[[TMP0:%.*]] = tail call i64 @llvm.vscale.i64() -// CHECK-C

[clang] [Sema] Compare canonical conversion function (PR #154158)

2025-10-13 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo closed https://github.com/llvm/llvm-project/pull/154158 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Replace float remquo with Intel IMF version (PR #162643)

2025-10-13 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/162643 >From 4574b973070d237c88f8a951e9a3c0fc9afcaeaf Mon Sep 17 00:00:00 2001 From: Wenju He Date: Thu, 9 Oct 2025 14:19:17 +0200 Subject: [PATCH 1/2] [libclc] Replace float remquo with Intel IMF version Current imp

[clang] [Sema] Keep attribute lists in the order the attributes were parsed (PR #162714)

2025-10-13 Thread Saleem Abdulrasool via cfe-commits
@@ -20,7 +20,7 @@ struct __attribute__((internal_linkage)) S { // expected-warning{{'internal_link __attribute__((internal_linkage("foo"))) int g(void) {} // expected-error{{'internal_linkage' attribute takes no arguments}} int var6 [[clang::internal_linkage]]; -int var7 [[c

[clang] [Clang] Add __builtin_bswapg (PR #162433)

2025-10-13 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/162433 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [runtimes][NFC] Consistently declare main() functions in tests (PR #162548)

2025-10-13 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 origin/main HEAD --extensions cpp -- libcxx/test/std/localization/codecvt_unicode.pas

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 PMADDWD/PMADDUBSW intrinsics (PR #161563)

2025-10-13 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/161563 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove special handling for older Ubuntu (PR #162518)

2025-10-13 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/162518 >From 5ed713889daa8bf71f11c96398b23567d5382488 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 8 Oct 2025 13:41:08 -0400 Subject: [PATCH] [Driver] Remove special handling for older Ubuntu Releases of Ubuntu

[clang] a9dafc9 - [Sema] Compare canonical conversion function (#154158)

2025-10-13 Thread via cfe-commits
Author: Jonas Hahnfeld Date: 2025-10-06T10:34:49+02:00 New Revision: a9dafc9bdcfc1090d0744d0c708c5d133bc0fd84 URL: https://github.com/llvm/llvm-project/commit/a9dafc9bdcfc1090d0744d0c708c5d133bc0fd84 DIFF: https://github.com/llvm/llvm-project/commit/a9dafc9bdcfc1090d0744d0c708c5d133bc0fd84.diff