[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

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

2025-03-31 Thread via cfe-commits
Author: Finn Plummer Date: 2025-03-31T10:26:51-07:00 New Revision: e4b9486056fab7a262fdafbe70acf393c9767d12 URL: https://github.com/llvm/llvm-project/commit/e4b9486056fab7a262fdafbe70acf393c9767d12 DIFF: https://github.com/llvm/llvm-project/commit/e4b9486056fab7a262fdafbe70acf393c9767d12.diff

[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
@@ -172,7 +172,7 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, 0 != s.compare(0, sv.length(), sv); // CHECK-MESSAGES: :[[@LINE-1]]:{{[0-9]+}}: warning: use starts_with - // CHECK-FIXES: s.starts_with(sv); + // CHECK-FIXES: !s.starts

[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 closed 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][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/3] [clang-tidy] improve docs for various checks --- .../che

[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
@@ -45,8 +45,8 @@ Options A semicolon-separated list of qualified types which should not be allowed to persist across suspension points. -Eg: ``my::lockable; a::b;::my::other::lockable;`` -The default value of this option is `"std::lock_guard;std::scoped_lock"

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

2025-03-31 Thread via cfe-commits
@@ -78,6 +78,6 @@ Options co_await wait(); } -Eg: ``my::safe::awaitable;other::awaitable`` -The default value of this option is empty string `""`. +Eg: `my::safe::awaitable;other::awaitable` +The default value of this option is an empty string. --

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

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

[clang] [C23] Allow casting from a null pointer constant to nullptr_t (PR #133742)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes C23 allows a cast of a null pointer constant to nullptr_t. e.g., (nullptr_t)0 or (nullptr_t)(void *)0. Fixes #133644 --- Full diff: https://github.com/llvm/llvm-project/pull/133742.diff 3 Files Affe

[clang] [flang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-31 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM, thank you https://github.com/llvm/llvm-project/pull/131041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improved the ``-Wtautological-overlap-compare`` diagnostics to warn a… (PR #133653)

2025-03-31 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu converted_to_draft https://github.com/llvm/llvm-project/pull/133653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-31 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,49 @@ +// RUN %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \ +// RUN -verify -complex-range=promoted -o - | FileCheck %s + +// RUN %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \ +// RUN -verify=nopromotion -complex-range=promoted -target-fe

[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread via cfe-commits
https://github.com/offsetof created https://github.com/llvm/llvm-project/pull/133747 CWG2611 "Missing parentheses in expansion of fold-expression could cause syntactic reinterpretation" Fixes #57396 >From 175e2531de9e2fceb72b25aed5073b225e2495ac Mon Sep 17 00:00:00 2001 From: offsetof Date:

[libclc] [libclc] Move several 'native' builtins to CLC library (PR #129679)

2025-03-31 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,3 @@ +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __clc_native_log(__CLC_GENTYPE val) { + return __clc_native_log2(val) * (1.0f / M_LOG2E_F); frasercrmck wrote: We now apply `-fapprox-func`, as of #133119. If I change this PR to remove the AMDGPU definition

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

2025-03-31 Thread via cfe-commits
@@ -45,8 +45,8 @@ Options A semicolon-separated list of qualified types which should not be allowed to persist across suspension points. -Eg: ``my::lockable; a::b;::my::other::lockable;`` -The default value of this option is `"std::lock_guard;std::scoped_lock"

[clang] [clang] Fix handling of explicit-`this` functions as template arguments (PR #133748)

2025-03-31 Thread via cfe-commits
https://github.com/offsetof created https://github.com/llvm/llvm-project/pull/133748 * In `Sema::BuildExpressionFromDeclTemplateArgument`, qualify names of explicit object member functions, and treat them as lvalues when the parameter is a reference. * Mangle explicit object member functions a

[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (offsetof) Changes CWG2611 "Missing parentheses in expansion of fold-expression could cause syntactic reinterpretation" Fixes #57396 --- Full diff: https://github.com/llvm/llvm-project/pull/133747.diff 6 Files Affected: - (modifi

[libclc] [libclc] Move several 'native' builtins to CLC library (PR #129679)

2025-03-31 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/129679 >From aabdf579b3d88e59f8604943573c9beeafb4cf66 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 4 Mar 2025 10:03:00 + Subject: [PATCH 1/2] [libclc] Move several 'native' builtins to CLC library

[libclc] [libclc] Move several 'native' builtins to CLC library (PR #129679)

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

[clang] [C11] Claim conformance to WG14 N1518 (PR #133749)

2025-03-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/133749 This paper introduced ranges of valid start and continuation characters for identifiers. C23 made further changes to these sets. >From cf67b14af5caf1853b8ec70df9d3119e2203b995 Mon Sep 17 00:00:00 2001 From

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

2025-03-31 Thread David Blaikie via cfe-commits
dwblaikie 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 fun

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

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

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

2025-03-31 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. 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] [flang] [flang][OpenMP] Bump default OpenMP version to 3.1 (PR #133745)

2025-03-31 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks Tom. This looks fine to me, but please wait for those more familiar with OpenMP before merging. https://github.com/llvm/llvm-project/pull/133745 ___ cfe-commits mailing list cfe-commits

[clang] [clang][bytecode] Return Invalid() on non-constexpr builtins (PR #133700)

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

[clang] 11dd7d9 - [clang][bytecode] Reject constexpr-unknown values from comparisons (#133701)

2025-03-31 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-31T18:53:01+02:00 New Revision: 11dd7d98a6ecd2374289b6a217e358e503d4778a URL: https://github.com/llvm/llvm-project/commit/11dd7d98a6ecd2374289b6a217e358e503d4778a DIFF: https://github.com/llvm/llvm-project/commit/11dd7d98a6ecd2374289b6a217e358e503d4778a.diff L

[clang] [HLSL] Fix codegen to support classes in `cbuffer` (PR #132828)

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

[clang] No longer assert on incorrect attribute argument index (PR #133766)

2025-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Fixes an assertion when referencing an out-of-bounds parameter via a function attribute whose argument list refers to parameters by index and the function is variadic. e.g., __attribute__ ((__form

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-31 Thread David Truby via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/130268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

<    1   2   3   4   >