[clang] d63cc4c - [analyzer] Unknown array lvalue element in Store (#133381)

2025-03-31 Thread via cfe-commits
Author: T-Gruber Date: 2025-03-31T08:44:28+02:00 New Revision: d63cc4c87689a79d25521c9aa2ce4a335e5984e3 URL: https://github.com/llvm/llvm-project/commit/d63cc4c87689a79d25521c9aa2ce4a335e5984e3 DIFF: https://github.com/llvm/llvm-project/commit/d63cc4c87689a79d25521c9aa2ce4a335e5984e3.diff LOG:

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-31 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133055 From bf3f06cc99a1ac2460ffea741c0fe495f0778e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 20 Mar 2025 13:23:25 +0100 Subject: [PATCH 1/4] [AMDGPU] Add "lds-bu

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-31 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -0,0 +1,45 @@ +; RUN: split-file %s %t +; +; RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx1100 %t/struct.ll 2>&1 | FileCheck --ignore-case %s +; RUN: not --crash llc -global-isel -mtriple=amdgcn -mcpu=gfx1100 %t/struct.ll 2>&1 | FileCheck --ignore-case %s +; RUN: not --crash

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,407 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 arsenm wrote: You don't have a backend vectorization test. This PR contains no clang changes. You should delete the clang test and replace it

[libclc] [libclc][amdgpu] Implement native_exp via builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Just realised I missed the brief - `native_exp2` should use the builtin, `native_exp` should continue to call `native_exp2`. https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `misc-`, `cppcore-` and other checks (PR #133694)

2025-03-31 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/133694 >From 3f2086a843ccbc2dca5185199bbb91c366bcae06 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 31 Mar 2025 13:12:23 +0300 Subject: [PATCH 1/2] [clang-tidy] improve docs for various checks --- .../che

[clang] [clang][modules] Guard against bad -fmodule-file mappings (#132059) (PR #133462)

2025-03-31 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Hi @ChuanqiXu9, @mpark, @shafik, For context, here is how this PR would change clang's behavior when replicating the original crash in #132059: The original crash, where the module `hello` wasn’t mapped to any BMI file, would now display the following: ```bash clang++ -fmo

[libclc] [libclc][amdgpu] Implement native_exp2 via AMD builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc][amdgpu] Implement native_exp2 via AMD builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > Just realised I missed the brief - `native_exp2` should use the builtin, > `native_exp` should continue to call `native_exp2`. Done https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-31 Thread Nikita Popov via cfe-commits
nikic wrote: @farzonl Instructions in the sense of the instructions retired during compilation, not the number of instructions in the object file :) I wouldn't expect the changes you made here to have any significant impact on build time. (I guess it might serialize the build more, maybe?) ht

[clang] [analyzer] Unknown array lvalue element in Store (PR #133381)

2025-03-31 Thread Balazs Benics via cfe-commits
@@ -511,13 +511,9 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, // Only allow non-integer offsets if the base region has no offset itself. // FIXME: This is a somewhat arbitrary restriction. We should be using // SValBuilder here to add the

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-03-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/133448 >From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 28 Mar 2025 13:29:27 + Subject: [PATCH 1/2] [clang][Sema] Fix typo in 'offsetof' diagnostics Before:

[libclc] [libclc][amdgpu] Implement native_exp via builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/133696 This came up during a discussion on #129679, which has been split out as a preparatory commit. An example of the AMDGPU codegen is: define <2 x float> @_Z10native_expDv2_f(<2 x float> %x) { %0 =

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-31 Thread via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [clang][CodeGen] Make pragma-loop test more rboust (NFC) (PR #133707)

2025-03-31 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj created https://github.com/llvm/llvm-project/pull/133707 pragma-loop.cpp contains tests for loop metadata generated via pragma directives. These tests were not working as (perhaps) expected. This is because the regex `.*` consumes multiple elements in metadata. For

[clang] [clang][CodeGen] Make pragma-loop test more rboust (NFC) (PR #133707)

2025-03-31 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj edited https://github.com/llvm/llvm-project/pull/133707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/121044 >From 77537d523bc164a86b46e83651500a4b37c0c3bf Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 24 Dec 2024 13:06:44 +0800 Subject: [PATCH 1/6] Reapply "[Clang] Improve diagnostics for expansion length mi

[libclc] [libclc][amdgpu] Implement native_exp via AMD builtin (PR #133696)

2025-03-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -std=c++11 -Wignored-qualifiers -verify +// RUN: %clang_cc1 %s -std=c++11 -Wignored-base-class-qualifiers -verify AaronBallman wrote: Might as well improve test coverage a bit. ``` // RUN: %clang_cc1 %s -std=c++11 -Wignored-

[clang] [Clang] add emit -Wignored-base-class-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-31 Thread Aaron Ballman via cfe-commits
@@ -497,6 +497,7 @@ def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">; def IgnoredGCH : DiagGroup<"ignored-gch">; def IgnoredReferenceQualifiers : DiagGroup<"ignored-reference-qualifiers">; def IgnoredQualifiers : DiagGroup<"ignored-qualifiers", [IgnoredReference

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-31 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -260,7 +260,7 @@ AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple &Triple, MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; CUMode = !(GPUFeatures & llvm::AMDGPU::FEATURE_WGP); - for (auto F : {"image-insts", "gws"}) + for (auto F : {"image-insts", "gws", "mem

[libclc] [libclc][amdgpu] Implement native_exp2 via AMD builtin (PR #133696)

2025-03-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/133696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133472 >From f9268b3a331fd8caf2440d742a1f084c0f9648ce Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 28 Mar 2025 13:01:58 -0400 Subject: [PATCH 1/6] [C11] Implement WG14 N1285 (temporary lifetimes) This

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > However, we do have some prior art -- we're not inventing the whole idea of > decl-merging from scratch right now. So maybe we can follow that prior art? > For example, top-level attributes on a struct's definition can be inherited > from a declaration in the same scope.

[clang] [RISCV][NFC] Make generated intrinsic records more human-readable (PR #133710)

2025-03-31 Thread Kito Cheng via cfe-commits
@@ -1196,36 +1196,93 @@ SmallVector parsePrototypes(StringRef Prototypes) { return PrototypeDescriptors; } +#define STRINGIFY(NAME) \ + case NAME: \ +

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-31 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 -- clang/include/clang/Sema/Sema.h clang/include/clang

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -3688,27 +3708,95 @@ static Function *getFreshReductionFunc(Module &M) { ".omp.reduction.func", &M); } -OpenMPIRBuilder::InsertPointOrErrorTy -OpenMPIRBuilder::createReductions(const LocationDescription &Loc, - Inse

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -4434,10 +4497,24 @@ getKmpcForStaticLoopForType(Type *Ty, OpenMPIRBuilder *OMPBuilder, static void createTargetLoopWorkshareCall( OpenMPIRBuilder *OMPBuilder, WorksharingLoopType LoopType, BasicBlock *InsertBlock, Value *Ident, Value *LoopBodyArg, -Type *Parall

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -4434,10 +4497,24 @@ getKmpcForStaticLoopForType(Type *Ty, OpenMPIRBuilder *OMPBuilder, static void createTargetLoopWorkshareCall( OpenMPIRBuilder *OMPBuilder, WorksharingLoopType LoopType, BasicBlock *InsertBlock, Value *Ident, Value *LoopBodyArg, -Type *Parall

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -4645,12 +4789,23 @@ initTargetDefaultAttrs(omp::TargetOp targetOp, Operation *capturedOp, (maxThreadsVal >= 0 && maxThreadsVal < combinedMaxThreadsVal)) combinedMaxThreadsVal = maxThreadsVal; + // Calculate reduction data size, limited to single reduction varia

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -4554,6 +4679,25 @@ static std::optional extractConstInteger(Value value) { return std::nullopt; } +static uint64_t getTypeByteSize(mlir::Type type, const DataLayout &dl) { + uint64_t sizeInBits = dl.getTypeSizeInBits(type); + uint64_t sizeInBytes = sizeInBits / 8; +

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -1018,19 +1017,31 @@ allocReductionVars(T loop, ArrayRef reductionArgs, // variable allocated in the inlined region) llvm::Value *var = builder.CreateAlloca( moduleTranslation.convertType(reductionDecls[i].getType())); - deferredStores.emplace_bac

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -4161,6 +4247,37 @@ convertOmpDistribute(Operation &opInst, llvm::IRBuilderBase &builder, if (failed(checkImplementationStatus(opInst))) return failure(); + /// Process teams op reduction in distribute if the reduction is contained in + /// the distribute op. + om

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -1714,6 +1727,43 @@ convertOmpSingle(omp::SingleOp &singleOp, llvm::IRBuilderBase &builder, return success(); } +static bool teamsReductionContainedInDistribute(omp::TeamsOp teamsOp) { + auto iface = + llvm::cast(teamsOp.getOperation()); + // Check that all uses o

[clang] [X86][AVX10] Re-target mavx10.1 and emit warning for mavx10.x-256/512 and m[no-]evex512 (PR #132542)

2025-03-31 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > LGTM - but we need to add a full explanation to the clang/llvm release notes > explaining the avx10 changes/deprecations (and future removal). Good reminder! Done. https://github.com/llvm/llvm-project/pull/132542 ___ cfe-commits m

[clang] ab7cee8 - [clang-format] Handle C++ keywords in other languages better (#132941)

2025-03-31 Thread via cfe-commits
Author: sstwcw Date: 2025-03-31T13:54:49Z New Revision: ab7cee8a0ecf29fdb47c64c8d431a694d63390d2 URL: https://github.com/llvm/llvm-project/commit/ab7cee8a0ecf29fdb47c64c8d431a694d63390d2 DIFF: https://github.com/llvm/llvm-project/commit/ab7cee8a0ecf29fdb47c64c8d431a694d63390d2.diff LOG: [clang

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak commented: Thank you Jan, I have a few superficial comments, but the approach LGTM. https://github.com/llvm/llvm-project/pull/133310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang-format] Recognize wait fork in Verilog (PR #132042)

2025-03-31 Thread via cfe-commits
https://github.com/sstwcw closed https://github.com/llvm/llvm-project/pull/132042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c7572ae - [X86][AVX10] Re-target mavx10.1 and emit warning for mavx10.x-256/512 and m[no-]evex512 (#132542)

2025-03-31 Thread via cfe-commits
Author: Phoebe Wang Date: 2025-03-31T22:05:50+08:00 New Revision: c7572ae213d215d54a10c8a03db75cc01f6291bd URL: https://github.com/llvm/llvm-project/commit/c7572ae213d215d54a10c8a03db75cc01f6291bd DIFF: https://github.com/llvm/llvm-project/commit/c7572ae213d215d54a10c8a03db75cc01f6291bd.diff L

[clang] [X86][AVX10] Re-target mavx10.1 and emit warning for mavx10.x-256/512 and m[no-]evex512 (PR #132542)

2025-03-31 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/132542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-03-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/133448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133472 >From f9268b3a331fd8caf2440d742a1f084c0f9648ce Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 28 Mar 2025 13:01:58 -0400 Subject: [PATCH 1/7] [C11] Implement WG14 N1285 (temporary lifetimes) This

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-03-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,212 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -std=c99 -Wno-dangling -emit-llvm -o - %s | FileCheck %s --check-prefix=C99 +// RUN: %clang_cc1 -std=c11 -Wno-dangling -emit-llvm -o - %s |

[clang] 0794d5c - [clang][Sema] Fix typo in 'offsetof' diagnostics (#133448)

2025-03-31 Thread via cfe-commits
Author: Michael Buch Date: 2025-03-31T14:56:29+01:00 New Revision: 0794d5cfba4b78b1bf7980a5f9434382a697df23 URL: https://github.com/llvm/llvm-project/commit/0794d5cfba4b78b1bf7980a5f9434382a697df23 DIFF: https://github.com/llvm/llvm-project/commit/0794d5cfba4b78b1bf7980a5f9434382a697df23.diff

[clang] [clang-format] Handle C++ keywords in other languages better (PR #132941)

2025-03-31 Thread via cfe-commits
https://github.com/sstwcw closed https://github.com/llvm/llvm-project/pull/132941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Recognize TableGen paste operator on separate line (PR #133722)

2025-03-31 Thread via cfe-commits
https://github.com/sstwcw created https://github.com/llvm/llvm-project/pull/133722 Formatting this piece of code made the program crash. ``` class TypedVecListRegOperand : RegisterOperand">; ``` The line starting with the `#` was treated as a separate preprocessor directive line. Then th

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-31 Thread via cfe-commits
@@ -0,0 +1,124 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -passes='sroa' -S | FileCheck %s +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-31 Thread via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-31 Thread via cfe-commits
@@ -0,0 +1,124 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -passes='sroa' -S | FileCheck %s +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n8:16:3

[clang] [X86][AVX10] Re-target mavx10.1 and emit warning for mavx10.x-256/512 and m[no-]evex512 (PR #132542)

2025-03-31 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/132542 >From 9a8d9b7d5d3f07685579c3d1336e146755bb7efa Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Sat, 22 Mar 2025 19:15:01 +0800 Subject: [PATCH 1/3] [X86][AVX10] Re-target mavx10.1 and emit warning for ma

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-03-31 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/121199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-31 Thread via cfe-commits
@@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetIns

[clang] [clang][CodeGen] Add range metadata for atomic load of boolean type. #131476 (PR #133546)

2025-03-31 Thread Jan Górski via cfe-commits
https://github.com/janagor edited https://github.com/llvm/llvm-project/pull/133546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4007de0 - Enable unnecessary-virtual-specifier by default (#133265)

2025-03-31 Thread via cfe-commits
Author: Devon Loehr Date: 2025-03-31T16:28:53+02:00 New Revision: 4007de00a0574141695ace7a8d34aaf740a2c2e4 URL: https://github.com/llvm/llvm-project/commit/4007de00a0574141695ace7a8d34aaf740a2c2e4 DIFF: https://github.com/llvm/llvm-project/commit/4007de00a0574141695ace7a8d34aaf740a2c2e4.diff L

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem closed https://github.com/llvm/llvm-project/pull/133265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread YunQiang Su via cfe-commits
@@ -0,0 +1,1059 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 wzssyqa wrote: https://github.com/llvm/llvm-project/pull/133690 https://github.com/llvm/llvm-project/pull/131781

[clang] [Clang][WIP][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/133426 >From 464aaf0944cac75ccc689ebb82e08554c12c6340 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 27 Mar 2025 16:25:07 +0100 Subject: [PATCH 1/6] [Clang][WIP][RFC] Bypass TAD during overload resolution i

[clang] [Clang][WIP][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread via cfe-commits
cor3ntin wrote: I could use help understanding how to fix `clang/test/Templight/templight-empty-entries-fix.cpp` - it always eludes me how to make FileCheck happy @AaronBallman https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailin

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-03-31 Thread via cfe-commits
macurtis-amd wrote: @arsenm Any recommendations for appeasing the [undef deprecator](https://github.com/llvm/llvm-project/pull/133301#issuecomment-2759145421)? https://github.com/llvm/llvm-project/pull/133301 ___ cfe-commits mailing list cfe-commits@l

[clang] [Clang][SPIR-V] Fix convergence tokens for dtor (PR #133469)

2025-03-31 Thread Nathan Gauër via cfe-commits
@@ -57,22 +58,37 @@ void main(unsigned GI : SV_GroupIndex) { // CHECK: define void @main() // CHECK-NEXT: entry: // Verify destructor is emitted -// NOINLINE-NEXT: call void @_GLOBAL__sub_I_GlobalDestructors.hlsl() -// NOINLINE-NEXT: %0 = call i32 @llvm.dx.flattened.th

[clang] 60199ee - [clang] Use DenseMap::insert_range (NFC) (#133655)

2025-03-31 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-30T22:57:25-07:00 New Revision: 60199ee5396c2242c7d3cfa882e28312e6895c2a URL: https://github.com/llvm/llvm-project/commit/60199ee5396c2242c7d3cfa882e28312e6895c2a DIFF: https://github.com/llvm/llvm-project/commit/60199ee5396c2242c7d3cfa882e28312e6895c2a.diff L

[clang] [analyzer] Unknown array lvalue element in Store (PR #133381)

2025-03-31 Thread Donát Nagy via cfe-commits
@@ -511,13 +511,9 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, // Only allow non-integer offsets if the base region has no offset itself. // FIXME: This is a somewhat arbitrary restriction. We should be using // SValBuilder here to add the

[clang] [sanitizer][CFI] Add support to build CFI with sanitize-coverage (PR #131296)

2025-03-31 Thread Maxim Zhukov via cfe-commits
Mephistophiles wrote: @vitalybuka ping :) Can I merge this PR? https://github.com/llvm/llvm-project/pull/131296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-03-31 Thread Eugene Shalygin via cfe-commits
@@ -3783,10 +3823,20 @@ void TokenAnnotator::annotate(AnnotatedLine &Line) { static bool isFunctionDeclarationName(const LangOptions &LangOpts, const FormatToken &Current, const AnnotatedLine &Line, +

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-03-31 Thread Eugene Shalygin via cfe-commits
https://github.com/zeule updated https://github.com/llvm/llvm-project/pull/131605 >From e2db7bd178a2c466b066787f235578b624a23644 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 17 Mar 2025 11:23:35 +0100 Subject: [PATCH] [clang-format] option to control bin-packing keyworded paramete

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread Pengcheng Wang via cfe-commits
@@ -962,6 +962,8 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM, static const unsigned ZvfhminZvfbfminPromoteOps[] = { ISD::FMINNUM, ISD::FMAXNUM, +ISD::FMINIMUMNUM, wangpc-pp wrote: RISCV changes should be in

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-03-31 Thread Eugene Shalygin via cfe-commits
https://github.com/zeule updated https://github.com/llvm/llvm-project/pull/131605 >From 7642499ca3bd2929c7392b7d619980b3cf9e648c Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 17 Mar 2025 11:23:35 +0100 Subject: [PATCH] [clang-format] option to control bin-packing keyworded paramete

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread YunQiang Su via cfe-commits
@@ -0,0 +1,1059 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 wzssyqa wrote: Do you mean that we should add this test case first and then this patch with update of the test case? https://github.com/llvm/llv

[clang] Reland [MS][clang] Add support for vector deleting destructors (PR #133451)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-msan` running on `sanitizer-buildbot10` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/5774 Here is the relev

[clang] [clang][Sema] Fix typo in 'offsetof' diagnostics (PR #133448)

2025-03-31 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/133448 >From 732a9b611bb4b6c49a0b4bf1d616870ffa051d8f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 28 Mar 2025 13:29:27 + Subject: [PATCH 1/3] [clang][Sema] Fix typo in 'offsetof' diagnostics Before:

[clang] [clang-format] Correctly annotate pointer/reference in _Generic (PR #133673)

2025-03-31 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/133673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,1059 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt --passes=loop-vectorize --mtriple=riscv64 -mattr="+zvfh,+v" -S < %s | FileCheck %s --check-prefix=RV64 +; RUN: opt --passes=loop-vectorize --mtriple=aa

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,1059 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt --passes=loop-vectorize --mtriple=riscv64 -mattr="+zvfh,+v" -S < %s | FileCheck %s --check-prefix=RV64 +; RUN: opt --passes=loop-vectorize --mtriple=aa

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: You can probably write a smaller test using SLPVectorizer, e.g. /llvm/test/Transforms/SLPVectorizer/AMDGPU/round.ll https://github.com/llvm/llvm-project/pull/131781 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/131781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (PR #128019)

2025-03-31 Thread via cfe-commits
https://github.com/CarolineConcatto commented: Hi Marian, There is some tests failing with the codegen. Can you rebase this patch and fix the failings tests https://github.com/llvm/llvm-project/pull/128019 ___ cfe-commits mailing list cfe-commits@list

[libclc] [libclc] Move rootn to the CLC library; optimize (PR #133735)

2025-03-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/133735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread via cfe-commits
https://github.com/cor3ntin deleted https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread via cfe-commits
https://github.com/cor3ntin ready_for_review https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes This implements the same overload resolution behavior as GCC, as described in https://wg21.link/p3606 (sections 1-2, not 3) If, during overload resolution, a non-template candidate is always picked because ea

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Juan Manuel Martinez Caamaño (jmmartinez) Changes This built-in that maps to `V_CVT_OFF_F32_I4` which treats its input as a 4-bit signed integer and returns `0.0625f * src`. SWDEV-518861 --- Full diff: https://github.com/llvm/llvm-projec

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Juan Manuel Martinez Caamaño (jmmartinez) Changes This built-in that maps to `V_CVT_OFF_F32_I4` which treats its input as a 4-bit signed integer and returns `0.0625f * src`. SWDEV-518861 --- Full diff: https://github.com/llvm/llvm-proj

[clang] Fix complex long double division with -mno-x87. (PR #133152)

2025-03-31 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/133152 >From 56a000612da3f58928362229a46800c6f077cc71 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 26 Mar 2025 13:18:36 -0700 Subject: [PATCH 1/2] Fix complex long division with -mno-x87. --- clang/

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-31 Thread Tom Tromey via cfe-commits
tromey wrote: > Removing the vtable global variable and moving the "location info" into the > static within the class, will work for the SCE debugger. I was thinking about this last night and wondering if the vtable will appear as a class member even if the class is local to a function? If so

[libclc] 3fd0eaa - [libclc][amdgpu] Implement native_exp2 via AMD builtin (#133696)

2025-03-31 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-03-31T16:54:04+01:00 New Revision: 3fd0eaae52503ee2bbdffc75753acc4bcc72fe60 URL: https://github.com/llvm/llvm-project/commit/3fd0eaae52503ee2bbdffc75753acc4bcc72fe60 DIFF: https://github.com/llvm/llvm-project/commit/3fd0eaae52503ee2bbdffc75753acc4bcc72fe60.diff

[libclc] 87602f6 - [libclc] Fix unresolved reference to missing table (#133691)

2025-03-31 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-03-31T16:55:23+01:00 New Revision: 87602f6d03ada10d0de7f1440320ffec4eb86790 URL: https://github.com/llvm/llvm-project/commit/87602f6d03ada10d0de7f1440320ffec4eb86790 DIFF: https://github.com/llvm/llvm-project/commit/87602f6d03ada10d0de7f1440320ffec4eb86790.diff

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-03-31 Thread via cfe-commits
@@ -10918,7 +11083,44 @@ bool OverloadCandidate::NotValidBecauseConstraintExprHasError() const { OverloadingResult OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, iterator &Best) { + + bool TwoPhaseResolution = +

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-03-31 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez created https://github.com/llvm/llvm-project/pull/133741 This built-in that maps to `V_CVT_OFF_F32_I4` which treats its input as a 4-bit signed integer and returns `0.0625f * src`. SWDEV-518861 From 41af38793161b0f1535c98c4695c36e081ef2f67 Mon Sep 17 00:00:00 200

[clang] [llvm] [mlir] [MLIR][OpenMP] Add codegen for teams reductions (PR #133310)

2025-03-31 Thread Sergio Afonso via cfe-commits
@@ -3832,38 +3920,13 @@ OpenMPIRBuilder::createReductions(const LocationDescription &Loc, // Populate the outlined reduction function using the elementwise reduction // function. Partial values are extracted from the type-erased array of // pointers to private variables.

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-31 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131822 >From 21f3ec3b644ea201e3aa15d18f74c795ccf120f3 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Tue, 18 Mar 2025 11:09:41 -0400 Subject: [PATCH 1/3] [Driver] Add linker options to support statical linking t

[clang] Remove duplicate API (PR #132776)

2025-03-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. libclang's API is called stable for a reason. It's too late to remove anything. The best we can do is to implement one function in terms of another to avoid duplication on implementation side, and put `[[deprecated("use the othe

[clang] [alpha.webkit.NoUnretainedMemberChecker] Ignore system-header-defined ivar / property of a forward declared type (PR #133755)

2025-03-31 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/133755 Prior to this PR, we were emitting warnings for Objective-C ivars and properties if the forward declaration of the type appeared first in a non-system header. This PR fixes the checker so tha we'd ignore ivars an

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/8938 Here is

[clang] [clang] Automatically add the `returns_twice` attribute to certain functions even if `-fno-builtin` is set (PR #133511)

2025-03-31 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/13556 Here is the relevant piece of the

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-31 Thread Aaron Ballman via cfe-commits
@@ -1646,7 +1646,6 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // Set up the return result. Tok.setIdentifierInfo(nullptr); - Tok.clearFlag(Token::NeedsCleaning); AaronBallman wrote: There are early returns between where we used to clear the n

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-31 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Patch rebased. The reported formatting issue here is in the test which however was mostly copied from a pre-existing test, so maybe clang-format should be done on all these tests or not. Skipping it for now. https://github.com/llvm/llvm-project/pull/109164 ___

[clang-tools-extra] [clang-tidy] Use --match-full-lines instead of --strict-whitespace in check_clang_tidy (PR #133756)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes See Discourse post here: https://discourse.llvm.org/t/rfc-using-match-full-lines-in-clang-tidy-tests/85553 I've added `--match-partial-fixes` to all tests that were failing, unless I noticed the

[clang] [llvm] [HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses (PR #133302)

2025-03-31 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/133302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Use --match-full-lines instead of --strict-whitespace in check_clang_tidy (PR #133756)

2025-03-31 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: The main changes are here. https://github.com/llvm/llvm-project/pull/133756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >