[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)

2025-08-24 Thread Aditi Medhane via cfe-commits
https://github.com/AditiRM edited https://github.com/llvm/llvm-project/pull/154715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Added partial support for compiling C++20 modules and header-units without scanning. (PR #147682)

2025-08-24 Thread Hassan Sajjad via cfe-commits
HassanSajjad-302 wrote: Hi. Now, I have complete 90% of N2978 with these changes. I also extended the test. Only shared file PCM feature is left. I will now work on HMake and will test the boost with this commit. I added new optimizations in HMake. With these, HMake is now 2x faster and consu

[clang-tools-extra] [clang-tidy] Support direct initialization in modernize smart pointer (PR #154732)

2025-08-24 Thread Liu Ke via cfe-commits
https://github.com/Sockke updated https://github.com/llvm/llvm-project/pull/154732 >From e7589f4a4b1a0dbc387020205746100ac21262a9 Mon Sep 17 00:00:00 2001 From: Sockke Date: Thu, 21 Aug 2025 18:42:20 +0800 Subject: [PATCH 1/2] [clang-tidy] Support direct initialization in modernize smart point

[clang] [clang] Check captured variables for noreturn attribute (PR #155213)

2025-08-24 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 cpp -- clang/lib/Sema/AnalysisBasedWarnings.cpp clang/test/S

[clang] [clang] Check captured variables for noreturn attribute (PR #155213)

2025-08-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes Anaysis for noreturn attribute now misses the case when an assignment to a variable is made inside a lambda function call. This change fixes that case. --- Full diff: https://github.com/llvm/llvm-project/pu

[clang] [clang] Check captured variables for noreturn attribute (PR #155213)

2025-08-24 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/155213 Anaysis for noreturn attribute now misses the case when an assignment to a variable is made inside a lambda function call. This change fixes that case. >From 52499a2a3fde7c66f398e5730f782e0faf6f6e2d Mon Sep 17

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-24 Thread via cfe-commits
@@ -401,36 +432,85 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); + Calls.UseAwaitSuspendDestroy = false; CallExpr *AwaitSuspend = cast_or_null( BuildSubExpr(ACT::AC

[clang] [clang-tools-extra] [clang] AST: fix getAs canonicalization of leaf types (PR #155028)

2025-08-24 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > The only thing that "leaf type" means is that there's no point in doing > anything except `dyn_cast`ing the canonical type. It's not a real language > concept, and we don't use the type property for any purpose except these > `getAs` specializations. So if the specializations

[clang] [Clang] fix for heterogeneous chip's host side's MaybeODRUseExprs clear (PR #121085)

2025-08-24 Thread via cfe-commits
fuaq wrote: > @shafik Added test for this bug. For heterogeneous chip's host side > compilation, just like src="https://private-user-images.githubusercontent.com/40196111/476344344-f2dfbf02-7253-4913-9a9c-105ffaf4da8f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVk

[clang] [clang][bytecode] Don't call getIndex() on one-past-end pointers (PR #155173)

2025-08-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/155173 >From 450ebd35245d908d067175757ef5b2a40dbea0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 24 Aug 2025 16:47:01 +0200 Subject: [PATCH] [clang][bytecode] Don't call getIndex() on one-

[clang] [clang][bytecode] Guard strcmp against differing element types (PR #154777)

2025-08-24 Thread Timm Baeder via cfe-commits
@@ -338,3 +338,12 @@ static void *FooTable[1] = { } }; +int strcmp(const char *, const char *); // all-note {{passing argument to parameter here}} +#define S "\x01\x02\x03\x04\x05\x06\x07\x08" +const char _str[] = {S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7]}; +const u

[clang] [llvm] [NVPTX] Support i256 load/store with 256-bit vector load (PR #155198)

2025-08-24 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/155198 >From 5a4d50f683166738c5ee03ac032ef4a3c6c0fec9 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Mon, 25 Aug 2025 02:45:10 + Subject: [PATCH] [NVPTX] Support i256 load/store with 256-bit vector load ---

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread Ye Tian via cfe-commits
TianYe717 wrote: @RKSimon Hi, Could you please take a look? Thanks! https://github.com/llvm/llvm-project/pull/154662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Enable constexpr handling for builtin elementwise fshl/fshr (PR #153572)

2025-08-24 Thread Matt Arsenault via cfe-commits
@@ -961,3 +961,51 @@ static_assert(fmaDouble1[3] == 26.0); constexpr float fmaArray[] = {2.0f, 2.0f, 2.0f, 2.0f}; constexpr float fmaResult = __builtin_elementwise_fma(fmaArray[1], fmaArray[2], fmaArray[3]); static_assert(fmaResult == 6.0f, ""); + +static_assert(__builtin_elem

[clang] [llvm] Trying to fix undefined symbol error caused by iterator variable (PR #141507)

2025-08-24 Thread via cfe-commits
ShashwathiNavada wrote: Ping @efriedma-quic https://github.com/llvm/llvm-project/pull/141507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support ZVqdot Codegen and C intrinsics (PR #154915)

2025-08-24 Thread Jim Lin via cfe-commits
@@ -0,0 +1,468 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+experimental-zvqdotq \ tclin914 wrote: Is either zve32x or zve64x sufficient https://github.com/

[clang] [llvm] [RISCV] Support ZVqdot Codegen and C intrinsics (PR #154915)

2025-08-24 Thread Jim Lin via cfe-commits
tclin914 wrote: Could we rename it to `vqdotsu.ll` to match its assembly name? https://github.com/llvm/llvm-project/pull/154915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [llvm] [RISCV] Support ZVqdot Codegen and C intrinsics (PR #154915)

2025-08-24 Thread Jim Lin via cfe-commits
@@ -2547,3 +2547,24 @@ let UnMaskedPolicyScheme = HasPolicyOperand, HasMasked = false in { defm vsm3me : RVVOutOp1BuiltinSet<"vsm3me", "i", [["vv", "Uv", "UvUvUv"]]>; } } + tclin914 wrote: ```suggestion // Zvqdotq ``` https://github.com/llvm/llvm-pr

[clang] [llvm] [RISCV] Support ZVqdot Codegen and C intrinsics (PR #154915)

2025-08-24 Thread Jim Lin via cfe-commits
tclin914 wrote: Could we put the intrinsic tests for Zvqdot to another separate subdirectory like Zvfbfmin? https://github.com/llvm/llvm-project/pull/154915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [clang-format] allow short function body on a single line (PR #151428)

2025-08-24 Thread Lidong Yan via cfe-commits
https://github.com/brandb97 updated https://github.com/llvm/llvm-project/pull/151428 >From 7cdbee9b9e2cc75e3f3260edefc62b717e42d734 Mon Sep 17 00:00:00 2001 From: Lidong Yan Date: Mon, 25 Aug 2025 13:19:22 +0800 Subject: [PATCH] [clang-format] allow short function bodies on a single line When

[libunwind] [libunwind] fix pc range condition check bug (PR #154902)

2025-08-24 Thread Wu Yingcong via cfe-commits
yingcong-wu wrote: Hi @reviewers-libunwind, @MaskRay, and @fmayer, could you please review this PR? Thanks. https://github.com/llvm/llvm-project/pull/154902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[libunwind] [libunwind] fix pc range condition check bug (PR #154902)

2025-08-24 Thread Wu Yingcong via cfe-commits
yingcong-wu wrote: For stage3 (bootstrapping-build, llvm-premerge-libcxx-next-runners), I don't think the failure is related to my change. ``` Unresolved Tests (2): lldb-api :: functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py lldb-api ::

[clang] [clang-tools-extra] [clang]: Support `analyzer_noreturn` attribute in `CFG` (PR #150952)

2025-08-24 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/150952 >From 417b4e465744f9a1d1704c87da4587626c9f5411 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 28 Jul 2025 16:23:21 +0300 Subject: [PATCH 1/2] Initial implementation --- .../bugprone/unchecked-optional

[clang] [Clang] Enable constexpr handling for builtin elementwise fshl/fshr (PR #153572)

2025-08-24 Thread Shafik Yaghmour via cfe-commits
@@ -961,3 +961,51 @@ static_assert(fmaDouble1[3] == 26.0); constexpr float fmaArray[] = {2.0f, 2.0f, 2.0f, 2.0f}; constexpr float fmaResult = __builtin_elementwise_fma(fmaArray[1], fmaArray[2], fmaArray[3]); static_assert(fmaResult == 6.0f, ""); + +static_assert(__builtin_elem

[clang] [clang-tools-extra] [clang] AST: fix getAs canonicalization of leaf types (PR #155028)

2025-08-24 Thread John McCall via cfe-commits
rjmccall wrote: The only thing that "leaf type" means is that there's no point in doing anything except `dyn_cast`ing the canonical type. It's not a real language concept, and we don't use the type property for any purpose except these `getAs` specializations. So if the specializations are wro

[clang] [clang][bytecode] Guard strcmp against differing element types (PR #154777)

2025-08-24 Thread Shafik Yaghmour via cfe-commits
@@ -338,3 +338,12 @@ static void *FooTable[1] = { } }; +int strcmp(const char *, const char *); // all-note {{passing argument to parameter here}} +#define S "\x01\x02\x03\x04\x05\x06\x07\x08" +const char _str[] = {S[0], S[1], S[2], S[3], S[4], S[5], S[6], S[7]}; +const u

[clang] [clang][bytecode] Implement ia32_select* builtins (PR #154758)

2025-08-24 Thread Shafik Yaghmour via cfe-commits
@@ -2778,6 +2778,40 @@ static bool interp__builtin_elementwise_fma(InterpState &S, CodePtr OpPC, return true; } +/// AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]". +static bool interp__builtin_select(InterpState &S, CodePtr OpPC, +

[clang-tools-extra] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-08-24 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 cpp -- clang-tools-extra/clang-tidy/utils/FormatStringConver

[clang-tools-extra] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-08-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/155200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-08-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/155200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-08-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: Please add tests and release notes about your change in `clang-tools-extra/docs/ReleaseNotes.rst` https://github.com/llvm/llvm-project/pull/155200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang-tools-extra] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-08-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: None (DaveBrantonCTCT) Changes These two examples illustrate the two problems ``` int8_t int_8_value; printf("%d", int_8_value) ; ``` Will fail to replace correctly. The int8_t will cause this e

[clang-tools-extra] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-08-24 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] [PowerPC] Take ABI into account for data layout (PR #149725)

2025-08-24 Thread Amy Kwan via cfe-commits
amy-kwan wrote: > @amy-kwan hi there, could you perhaps review this PR or help me figure out > who might be able to review it? Thanks! Thanks for notifying us. @mandlebug and/or @RolandF77 might also be interested in taking a look at this PR. https://github.com/llvm/llvm-project/pull/149725 _

[clang-tools-extra] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-08-24 Thread via cfe-commits
https://github.com/DaveBrantonCTCT created https://github.com/llvm/llvm-project/pull/155200 These two examples illustrate the two problems ``` int8_t int_8_value; printf("%d", int_8_value) ; ``` Will fail to replace correctly. The int8_t will cause this error message, and the replacement will

[clang] [llvm] [NVPTX] Support i256 load/store with 256-bit vector load (PR #155198)

2025-08-24 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/155198 >From e8e640ba75a072ebc9dfe0d004c48a42dbbb82ce Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Mon, 25 Aug 2025 02:45:10 + Subject: [PATCH] [NVPTX] Support i256 load/store with 256-bit vector load ---

[clang] [clang] Remove hasValue() check in `RecordExprEvaluator::VisitCXXConstructExpr()` (PR #154610)

2025-08-24 Thread Eli Friedman via cfe-commits
@@ -11045,10 +11045,6 @@ bool RecordExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E, bool ZeroInit = E->requiresZeroInitialization(); if (CheckTrivialDefaultConstructor(Info, E->getExprLoc(), FD, ZeroInit)) { -// If we've already performed zero-initiali

[clang] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-24 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (The CI failures looks like an unrelated lldb test failure.) https://github.com/llvm/llvm-project/pull/151643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Fixes https://github.com/clangd/clangd/issues/2432 --- Full diff: https://github.com/llvm/llvm-project/pull/151643.diff 4 Files Affected: - (modified) clang/include/clang/Sema/HeuristicResolver.h (+

[clang] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/151643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/151643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/151643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/151643 >From 82f95113d5133c8d8579f6445981ad20dce1881a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 24 Aug 2025 23:03:40 -0400 Subject: [PATCH 1/2] [clang][Sema] Implement additional heuristics from Se

[clang] [Headers][X86] Allow AVX512VLBW integer reduction intrinsics to be used in constexpr (PR #155199)

2025-08-24 Thread Chaitanya Koparkar via cfe-commits
https://github.com/ckoparkar updated https://github.com/llvm/llvm-project/pull/155199 >From c5cf1b22f92c0c4d41b92ee45ee3f39c845c27be Mon Sep 17 00:00:00 2001 From: Chaitanya Koparkar Date: Sat, 23 Aug 2025 07:57:38 -0400 Subject: [PATCH] [Headers][X86] Allow AVX512VLBW integer reduction intrins

[clang] [WIP] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/151643 >From b390789b36aeed3223eca073230fc90daea30dab Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 24 Aug 2025 23:03:40 -0400 Subject: [PATCH 1/2] [clang][Sema] Implement additional heuristics from Se

[clang] [RISCV] Refactor RVV builtin code generation for reduce compilation time [NFC] (PR #154906)

2025-08-24 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 cpp -- clang/lib/CodeGen/TargetBuiltins/RISCV.cpp ``

[clang] [RISCV] Refactor RVV builtin code generation for reduce compilation time [NFC] (PR #154906)

2025-08-24 Thread Kito Cheng via cfe-commits
kito-cheng wrote: Changes: - Address Craig's comment - Drop else after return - Adjust size for SmallVector - Use SmallVectorImpl at argument list - Use array to CGM.getIntrinsic's argument directly rather than create a temporary SmallVector https://github.com/llvm/llvm-project/pull/154

[clang] [Headers][X86] Allow AVX512VLBW integer reduction intrinsics to be used in constexpr (PR #155199)

2025-08-24 Thread Chaitanya Koparkar via cfe-commits
https://github.com/ckoparkar updated https://github.com/llvm/llvm-project/pull/155199 >From 981fa7db5cd83b9c8b240e6b116a52592a59617a Mon Sep 17 00:00:00 2001 From: Chaitanya Koparkar Date: Sat, 23 Aug 2025 07:57:38 -0400 Subject: [PATCH] [Headers][X86] Allow AVX512VLBW integer reduction intrins

[clang] [Clang][CodeGen] Preserve alignment information for pointer arithmetics (PR #152575)

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

[clang] [Headers][X86] Allow AVX512VLBW integer reduction intrinsics to be used in constexpr (PR #155199)

2025-08-24 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,c -- clang/lib/Headers/avx512vlbwintrin.h clang/test/Code

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-24 Thread via cfe-commits
huixie90 wrote: > > Thank you working on this! Can you explain why we introduce this new > > attribute in summary? > > @yronglin Compiler support for this new attribute is required by @philnik777 > before libc++ can mark its `std::expected` with the `[[nodiscard]]` > attribute, as requested i

[clang] [Headers][X86] Allow AVX512VLBW integer reduction intrinsics to be used in constexpr (PR #155199)

2025-08-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chaitanya Koparkar (ckoparkar) Changes Fixes #154284 Add constexpr support for the following: _mm_reduce_add_epi8 _mm_reduce_add_epi16 _mm256_reduce_add_epi8 _mm256_reduce_add_epi16 _mm_reduce_mul_epi8 _mm_reduce_mul_epi16 _mm256_reduce

[clang] [Headers][X86] Allow AVX512VLBW integer reduction intrinsics to be used in constexpr (PR #155199)

2025-08-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Chaitanya Koparkar (ckoparkar) Changes Fixes #154284 Add constexpr support for the following: _mm_reduce_add_epi8 _mm_reduce_add_epi16 _mm256_reduce_add_epi8 _mm256_reduce_add_epi16 _mm_reduce_mul_epi8 _mm_reduce_mul_epi16 _mm256_

[clang] [Headers][X86] Allow AVX512VLBW integer reduction intrinsics to be used in constexpr (PR #155199)

2025-08-24 Thread Chaitanya Koparkar via cfe-commits
https://github.com/ckoparkar created https://github.com/llvm/llvm-project/pull/155199 Fixes #154284 Add constexpr support for the following: _mm_reduce_add_epi8 _mm_reduce_add_epi16 _mm256_reduce_add_epi8 _mm256_reduce_add_epi16 _mm_reduce_mul_epi8 _mm_reduce_mul_epi16 _mm256_reduce_mul_epi8

[clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

2025-08-24 Thread Kevin Sala Penades via cfe-commits
https://github.com/kevinsala updated https://github.com/llvm/llvm-project/pull/152651 >From 099c502bdf02ed9bc34bbfc70a6e786746ecee90 Mon Sep 17 00:00:00 2001 From: Kevin Sala Date: Fri, 8 Aug 2025 10:43:52 -0700 Subject: [PATCH 1/6] [OpenMP] Add parser/semantic support for dyn_groupprivate cla

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Nathan Ridge via cfe-commits
@@ -301,10 +302,34 @@ std::vector HeuristicResolverImpl::resolveMemberExpr( return {}; } + // check if member expr is in the context of an explicit object method + // If so, it's safe to assume the templated arg is of type of the record + const auto ExplicitMemberHeu

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: Thanks! This looks generally good to me. https://github.com/llvm/llvm-project/pull/155143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Nathan Ridge via cfe-commits
@@ -2468,6 +2469,46 @@ TEST(CrossFileRenameTests, adjustmentCost) { } } +TEST(RenameTest, RenameWithExplicitObjectPararameter) { HighCommander4 wrote: Instead of adding a new top-level test case (which involves repeating some boilerplate), could you add an

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/155143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ye Tian (TianYe717) Changes This patch updates the MMX/SSE/AVX2/AVX512 absolute intrinsics to be constexpr, addressing issue #153556. In addition, four supporting intrinsics were also updated to constexpr and tested, as they are directly

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Ye Tian (TianYe717) Changes This patch updates the MMX/SSE/AVX2/AVX512 absolute intrinsics to be constexpr, addressing issue #153556. In addition, four supporting intrinsics were also updated to constexpr and tested, as they are di

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread Ye Tian via cfe-commits
https://github.com/TianYe717 ready_for_review https://github.com/llvm/llvm-project/pull/154662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread Ye Tian via cfe-commits
https://github.com/TianYe717 updated https://github.com/llvm/llvm-project/pull/154662 >From 46a7f75ab3313a0bd78e40cf88d63cc5fde8dd6e Mon Sep 17 00:00:00 2001 From: Ye Tian <939808...@qq.com> Date: Thu, 21 Aug 2025 11:01:51 +0800 Subject: [PATCH] [Headers][X86] Allow integer/fp absolute intrinsic

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread Ye Tian via cfe-commits
https://github.com/TianYe717 edited https://github.com/llvm/llvm-project/pull/154662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread Ye Tian via cfe-commits
https://github.com/TianYe717 edited https://github.com/llvm/llvm-project/pull/154662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support ZVqdot Codegen and C intrinsics (PR #154915)

2025-08-24 Thread Brandon Wu via cfe-commits
@@ -52,10 +52,72 @@ let Predicates = [HasStdExtZvqdotq], mayLoad = 0, mayStore = 0, defm PseudoVQDOT : VPseudoVQDOT_VV_VX; defm PseudoVQDOTU : VPseudoVQDOT_VV_VX; defm PseudoVQDOTSU : VPseudoVQDOT_VV_VX; + // VQDOTUS does not have a VV variant + foreach m = MxListVF4 i

[clang] [llvm] [RISCV] Support ZVqdot Codegen and C intrinsics (PR #154915)

2025-08-24 Thread Brandon Wu via cfe-commits
@@ -52,10 +52,72 @@ let Predicates = [HasStdExtZvqdotq], mayLoad = 0, mayStore = 0, defm PseudoVQDOT : VPseudoVQDOT_VV_VX; defm PseudoVQDOTU : VPseudoVQDOT_VV_VX; defm PseudoVQDOTSU : VPseudoVQDOT_VV_VX; + // VQDOTUS does not have a VV variant + foreach m = MxListVF4 i

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-24 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Hey folks, Thanks for the work. > > Please note that adding a new attribute should go through an RFC. I know > @yuxuanchen1997 proposed something in the same design space a while ago - but > we never seem to have reached consensus > https://discourse.llvm.org/t/language-ex

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-24 Thread Chuanqi Xu via cfe-commits
@@ -401,36 +432,85 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); + Calls.UseAwaitSuspendDestroy = false; CallExpr *AwaitSuspend = cast_or_null( BuildSubExpr(ACT::AC

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-24 Thread via cfe-commits
https://github.com/halbi2 updated https://github.com/llvm/llvm-project/pull/154943 >From bb04ff2cf154b1c5547f7d5236e8fe769b9a54dd Mon Sep 17 00:00:00 2001 From: halbi2 Date: Fri, 22 Aug 2025 09:13:17 -0400 Subject: [PATCH 1/3] [clang] Add the candiscard attribute to suppress nodiscard Fulfill

[clang] [Headers][X86] Allow integer/fp absolute intrinsics to be used in constexpr (PR #154662)

2025-08-24 Thread Ye Tian via cfe-commits
https://github.com/TianYe717 updated https://github.com/llvm/llvm-project/pull/154662 >From 46a7f75ab3313a0bd78e40cf88d63cc5fde8dd6e Mon Sep 17 00:00:00 2001 From: Ye Tian <939808...@qq.com> Date: Thu, 21 Aug 2025 11:01:51 +0800 Subject: [PATCH] [Headers][X86] Allow integer/fp absolute intrinsic

[clang] [clang] Remove hasValue() check in `RecordExprEvaluator::VisitCXXConstructExpr()` (PR #154610)

2025-08-24 Thread Shafik Yaghmour via cfe-commits
@@ -11045,10 +11045,6 @@ bool RecordExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E, bool ZeroInit = E->requiresZeroInitialization(); if (CheckTrivialDefaultConstructor(Info, E->getExprLoc(), FD, ZeroInit)) { -// If we've already performed zero-initiali

[libunwind] [libunwind] fix pc range condition check bug (PR #154902)

2025-08-24 Thread Wu Yingcong via cfe-commits
https://github.com/yingcong-wu updated https://github.com/llvm/llvm-project/pull/154902 >From 57ebc553828bf696b4bde30789e609ba96e94d6d Mon Sep 17 00:00:00 2001 From: Wu Yingcong Date: Fri, 22 Aug 2025 15:16:47 +0800 Subject: [PATCH 1/2] fix missing by one bug --- libunwind/src/DwarfParser.hpp

[clang] [llvm] [mlir] [Coroutines] Add llvm.coro.is_in_ramp and drop return value of llvm.coro.end (PR #153404)

2025-08-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/153404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-24 Thread via cfe-commits
halbi2 wrote: > Thank you working on this! Can you explain why we introduce this new > attribute in summary? @yronglin Compiler support for this new attribute is required by @philnik777 before libc++ can mark its `std::expected` with the `[[nodiscard]]` attribute, as requested in #130656 and

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-24 Thread via cfe-commits
https://github.com/halbi2 edited https://github.com/llvm/llvm-project/pull/154943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-24 Thread via cfe-commits
@@ -8,16 +8,26 @@ using NI [[nodiscard]] = int; // expected-warning {{'[[nodiscard]]' attribute ignored when applied to a typedef}} using WURI [[clang::warn_unused_result]] = int; +using EIgnored [[clang::candiscard]] = E; +using NIIgnored [[clang::candiscard]] = NI; +using W

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-24 Thread via cfe-commits
@@ -3646,6 +3646,14 @@ def Unavailable : InheritableAttr { let MeaningfulToClassTemplateDefinition = 1; } +def CanDiscard : InheritableAttr { + let Spellings = [CXX11<"clang", "candiscard">, + GCC<"candiscard">]; + let Subjects = SubjectList<[ObjCMethod,

[clang] [clang] Enable constexpr handling for __builtin_elementwise_fma (PR #152919)

2025-08-24 Thread Chaitanya Koparkar via cfe-commits
@@ -11874,6 +11874,28 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); } + + case Builtin::BI__builtin_elementwise_fma: { +APValue SourceX, SourceY, SourceZ; +if (!Evaluate

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-08-24 Thread Nathan Ridge via cfe-commits
@@ -238,7 +231,13 @@ getFoldingRanges(const std::string &Code, bool LineFoldingOnly) { AddFoldingRange(Start, End, FoldingRange::REGION_KIND); } + auto Preprocessed = DirectiveStructure.stripDirectives(OrigStream); HighCommander4 wrote: Please preserv

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/140959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-08-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks for the update! I have just some minor comments remaining, otherwise this should be good to merge. https://github.com/llvm/llvm-project/pull/140959 ___ cfe-commits mailing list cfe-

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-08-24 Thread Nathan Ridge via cfe-commits
@@ -356,5 +356,62 @@ TokenStream DirectiveTree::stripDirectives(const TokenStream &In) const { return Out; } +namespace { +class RangePairer { + std::vector &Ranges; + +public: + RangePairer(std::vector &Ranges) : Ranges(Ranges) {} + + void walk(const DirectiveTree &T) {

[clang-tools-extra] [clangd] Implement simple folding for preprocessor branches (PR #140959)

2025-08-24 Thread Nathan Ridge via cfe-commits
@@ -356,5 +356,62 @@ TokenStream DirectiveTree::stripDirectives(const TokenStream &In) const { return Out; } +namespace { +class RangePairer { + std::vector &Ranges; + +public: + RangePairer(std::vector &Ranges) : Ranges(Ranges) {} + + void walk(const DirectiveTree &T) {

[clang] [llvm] [PseudoProbe] Support emitting to COFF object (PR #123870)

2025-08-24 Thread Haohai Wen via cfe-commits
HaohaiWen wrote: This PR is ready for review. https://github.com/llvm/llvm-project/pull/123870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply-To: @@ -992,6 +992,32 @@ struct FormatStyle { /// \version 20 bool AllowShortNamespacesOnASingleLine; + /// Di

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply-To: @@ -992,6 +992,33 @@ struct FormatStyle { /// \version 20 bool AllowShortNamespacesOnASingleLine; + /// Di

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply-To: https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/154580 ___ c

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply-To: owenca wrote: > > The command-line option `-style='{AllowShortRecordsOnASingleLine: Never}'` > > I used in the example implies `Af

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply-To: @@ -1553,6 +1563,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.AllowShortFuncti

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Mythreya Kuricheti via cfe-commits
@@ -301,9 +302,34 @@ std::vector HeuristicResolverImpl::resolveMemberExpr( return {}; } + // check if member expr is in the context of an explicit object method + // If so, it's safe to assume the templated arg is of type of the record + const auto ExplicitMemberHeur

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/155143 >From c1cdb3909c0bb55ce21d339f087c1e38616fec3f Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Sat, 23 Aug 2025 23:57:18 -0700 Subject: [PATCH 1/5] [clang] Heuristic resolution for explicit object par

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread Tomáš Slanina via cfe-commits
https://github.com/itzexpoexpo updated https://github.com/llvm/llvm-project/pull/154580 From 3a8be59bd1fb94102d446cdb8fdf1b266123c613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Slanina?= Date: Wed, 20 Aug 2025 19:28:23 +0200 Subject: [PATCH 1/6] [clang-format] Add option AllowSh

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-24 Thread via cfe-commits
abhijeetsharma200 wrote: > can you fix the formatting? thanks! Done! https://github.com/llvm/llvm-project/pull/152888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-24 Thread via cfe-commits
https://github.com/abhijeetsharma200 updated https://github.com/llvm/llvm-project/pull/152888 >From 48d71f870d21a45c0a197d1853788a4aec80018b Mon Sep 17 00:00:00 2001 From: Abhijeet Sharma Date: Sun, 10 Aug 2025 04:49:15 +0200 Subject: [PATCH 1/4] Added explain is trivially default constructible

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread Tomáš Slanina via cfe-commits
itzexpoexpo wrote: > The command-line option `-style='{AllowShortRecordsOnASingleLine: Never}'` I > used in the example implies `AfterClass: false`, so `SplitEmptyRecord` > doesn't matter. See > https://github.com/llvm/llvm-project/issues/154796#issuecomment-3218392876. The same code that mer

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Mythreya Kuricheti via cfe-commits
@@ -301,9 +302,34 @@ std::vector HeuristicResolverImpl::resolveMemberExpr( return {}; } + // check if member expr is in the context of an explicit object method + // If so, it's safe to assume the templated arg is of type of the record MythreyaK wrote

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/155143 >From c1cdb3909c0bb55ce21d339f087c1e38616fec3f Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Sat, 23 Aug 2025 23:57:18 -0700 Subject: [PATCH 1/4] [clang] Heuristic resolution for explicit object par

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply-To: @@ -992,6 +992,32 @@ struct FormatStyle { /// \version 20 bool AllowShortNamespacesOnASingleLine; + /// Different styles for merging s

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-24 Thread via cfe-commits
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina Message-ID: In-Reply-To: @@ -992,6 +992,32 @@ struct FormatStyle { /// \version 20 bool AllowShortNamespacesOnASingleLine;

  1   2   3   >