[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -447,6 +448,133 @@ mlir::LogicalResult cir::ReturnOp::verify() { return success(); } +//===--===// +// IfOp +//===--===// + +ParseResult

[clang] 78905ce - [CIR] Upstream support for logical not operations (#133966)

2025-04-04 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-04T17:36:14-07:00 New Revision: 78905ce6cbd3fa8f8b467e7cad0e9a093c1b1c44 URL: https://github.com/llvm/llvm-project/commit/78905ce6cbd3fa8f8b467e7cad0e9a093c1b1c44 DIFF: https://github.com/llvm/llvm-project/commit/78905ce6cbd3fa8f8b467e7cad0e9a093c1b1c44.diff L

[clang] [CIR] Upstream support for logical not operations (PR #133966)

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

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-04 Thread Alexander Kornienko via cfe-commits
alexfh wrote: We're seeing another problem after this commit: seemingly bogus `class member cannot be redeclared` errors. I'll try to provide a reduced repro on Monday. https://github.com/llvm/llvm-project/pull/133610 ___ cfe-commits mailing list cfe-

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-04-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,748 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Clang][SYCL] Add support AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Justin Cai (jzc) Changes This PR adds support for AOT compilation for Intel CPUs and GPUs in clang-sycl-linker. When no `-arch` is passed to `clang-sycl-linker`, the output of the tool will be the resulting linked SPIR-V bytecode.

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #134453 --- Full diff: https://github.com/llvm/llvm-project/pull/134472.diff 6 Files Affected: - (modified) clang/lib/Format/Format.cpp (+1-1) - (modified) clang/lib/Format/FormatToken.cpp (+1-1) -

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/134472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Add target builtins (PR #134439)

2025-04-04 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/134439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Set C11 instead of C17 for LK_C (PR #134472)

2025-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/134472 Fix #134453 >From 17ccac23889d377d66d327dbaac7c44fc4207b1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 4 Apr 2025 19:21:55 -0700 Subject: [PATCH] [clang-format] Set C11 instead of C17 for LK_C Fix #13445

[clang] [clang-format] Merge inline short functions for BS_Whitesmiths (PR #134473)

2025-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/134473 Fix 126747 >From 12acc02f8ffd2317ed1197d7397cb1abc1a4fd07 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 4 Apr 2025 19:31:12 -0700 Subject: [PATCH] [clang-format] Merge inline short functions for BS_Whitesm

[clang] [clang-format] Merge inline short functions for BS_Whitesmiths (PR #134473)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix 126747 --- Full diff: https://github.com/llvm/llvm-project/pull/134473.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineFormatter.cpp (+7-2) - (modified) clang/unittests/Format/Form

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes With implicitly-built modules, seeing something like: ``` fatal error: module 'X' is defined in both '/HASH1/X-HASH2.pcm' and '/HASH1/X-HASH3.pcm' ``` is super confusing and not actionable,

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes With implicitly-built modules, seeing something like: ``` fatal error: module 'X' is defined in both '/HASH1/X-HASH2.pcm' and '/HASH1/X-HASH3.pcm' ``` is super confusing and not acti

[clang] [clang][modules] Name the module map files on PCM file conflict (PR #134475)

2025-04-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/134475 With implicitly-built modules, seeing something like: ``` fatal error: module 'X' is defined in both '/HASH1/X-HASH2.pcm' and '/HASH1/X-HASH3.pcm' ``` is super confusing and not actionable, because the modu

[clang] [llvm] [Clang][NVVM] Support `-f[no-]cuda-prec-sqrt` and propagate precision flag to `NVVMReflect` (PR #134244)

2025-04-04 Thread via cfe-commits
Lai-YT wrote: > At first glance, it seems like a good idea to allow people to choose how > their square roots are lowered on a per-function level: some code cares about > precise square roots, some doesn't, and you should be able to make choices on > a case-by-case basis. > > But looking at t

[clang] [llvm] [LLVM][Clang][Cygwin] Fix Cygwin builds (PR #134458)

2025-04-04 Thread Mateusz Mikuła via cfe-commits
https://github.com/mati865 converted_to_draft https://github.com/llvm/llvm-project/pull/134458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][Cygwin] Fix Cygwin builds (PR #134458)

2025-04-04 Thread Mateusz Mikuła via cfe-commits
https://github.com/mati865 closed https://github.com/llvm/llvm-project/pull/134458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Handle AttributedType in template deduction with derived-to-base conversions (PR #134361)

2025-04-04 Thread Dmitri Gribenko via cfe-commits
https://github.com/gribozavr approved this pull request. https://github.com/llvm/llvm-project/pull/134361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dfb6c76 - [clang] ASTContex: fix getCommonSugaredType for array types (#132559)

2025-04-04 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-03-25T15:13:50-03:00 New Revision: dfb6c761f75581f4230d1e9ec6a569686f0bf11c URL: https://github.com/llvm/llvm-project/commit/dfb6c761f75581f4230d1e9ec6a569686f0bf11c DIFF: https://github.com/llvm/llvm-project/commit/dfb6c761f75581f4230d1e9ec6a569686f0bf11c.dif

[clang] bdff739 - cuda clang: Clean up test dependency for CUDA surfaces (#134459)

2025-04-04 Thread via cfe-commits
Author: Austin Schuh Date: 2025-04-04T15:52:44-07:00 New Revision: bdff739c7e79933aa7b3233da1bdadceeb7e03e6 URL: https://github.com/llvm/llvm-project/commit/bdff739c7e79933aa7b3233da1bdadceeb7e03e6 DIFF: https://github.com/llvm/llvm-project/commit/bdff739c7e79933aa7b3233da1bdadceeb7e03e6.diff

[clang] cuda clang: Clean up test dependency for CUDA surfaces (PR #134459)

2025-04-04 Thread Jorge Gorbe Moya via cfe-commits
https://github.com/slackito closed https://github.com/llvm/llvm-project/pull/134459 ___ 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-04-04 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/8] Reapply "[Clang] Improve diagnostics for expansion length mi

[clang] a2ca2f3 - [CIR] Fix cir-canonicalize pass upstreaming issues. NFC

2025-04-04 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2025-04-02T02:14:17-04:00 New Revision: a2ca2f3f10002da61e9860d0ce11e0272482baba URL: https://github.com/llvm/llvm-project/commit/a2ca2f3f10002da61e9860d0ce11e0272482baba DIFF: https://github.com/llvm/llvm-project/commit/a2ca2f3f10002da61e9860d0ce11e0272482baba.diff

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-04-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. lgtm with nits https://github.com/llvm/llvm-project/pull/115821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-04 Thread Florian Mayer via cfe-commits
fmayer wrote: Looks like this CL broke the MSAN bot: https://lab.llvm.org/buildbot/#/builders/169/builds/10068 https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] b0d0636 - [CIR] Upstream support for break and continue statements (#134181)

2025-04-04 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-04T15:53:11-07:00 New Revision: b0d0636026cdd2d1088d60c169a7a3a3371c0e66 URL: https://github.com/llvm/llvm-project/commit/b0d0636026cdd2d1088d60c169a7a3a3371c0e66 DIFF: https://github.com/llvm/llvm-project/commit/b0d0636026cdd2d1088d60c169a7a3a3371c0e66.diff L

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

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

[clang] [llvm] [LLVM][Clang][Cygwin] Fix Cygwin builds (PR #134458)

2025-04-04 Thread Eli Friedman via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: https://github.com/efriedma-quic commented: Please split this into multiple pull requests; some of these probably need different reviewers, and GitHub doe

[clang] [llvm] [LLVM][Clang][Cygwin] Fix Cygwin builds (PR #134458)

2025-04-04 Thread Mateusz Mikuła via cfe-commits
mati865 wrote: Sure, I'll split this in the upcoming days. https://github.com/llvm/llvm-project/pull/134458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-backend-risc-v Author: Jonathan Thackray (jthackray) Changes clang/lib/CodeGen/CGBuiltin.cpp is over 1MB long (>23k LoC), and can take minutes to recompile (depending on compiler and host system) when modified, and 5

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-04 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/134461 This fixes partial ordering of pack expansions of NTTPs, by procedding with the check using the pattern of the NTTP through the rules of the non-pack case. This also unifies almost all of the different version

[clang] [flang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-04-04 Thread via cfe-commits
https://github.com/GeorgeKA edited https://github.com/llvm/llvm-project/pull/120900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-04 Thread Deric C. via cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return isinf((float4)V); } _DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp) _DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp) +//===--===// +// lit builtins overloa

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Andy Kaylor via cfe-commits
@@ -25,6 +25,147 @@ using namespace clang; using namespace clang::CIRGen; using namespace cir; +/// Given an expression of pointer type, try to +/// derive a more accurate bound on the alignment of the pointer. +Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-04 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Remove YMM rounding from VCVT2PS2PHX (PR #132397)

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

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread via cfe-commits
@@ -871,13 +871,81 @@ struct FormatStyle { /// void f() { bar(); } /// \endcode SFS_All, +/// Configure merge behavior using AllowShortFunctionsOnASingleLineOptions +SFS_Custom, }; /// Dependent on the value, ``int f() { return 0; }`` can be put on

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-04-04 Thread David Rivera via cfe-commits
RiverDave wrote: Ping https://github.com/llvm/llvm-project/pull/131969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread via cfe-commits
@@ -871,13 +871,81 @@ struct FormatStyle { /// void f() { bar(); } /// \endcode SFS_All, +/// Configure merge behavior using AllowShortFunctionsOnASingleLineOptions +SFS_Custom, }; /// Dependent on the value, ``int f() { return 0; }`` can be put on

[clang] [Clang][Headers] Workaround for UCRT's `` in `` (PR #121650)

2025-04-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Is there a way to add test coverage for the changes? Also, this should come with a release note so users know about the fix. https://github.com/llvm/llvm-project/pull/121650 ___ cfe-commits mailing list cfe-c

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread via cfe-commits
@@ -316,6 +316,106 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +/// Emit an `if` on a boolean condition, filling `then` and `else` into +/// appropriated regions. +mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr(const Expr *cond, +

[clang] a1935fd - [clang] Remove unused SourceManager.cpp includes, NFC (trying out clangd)

2025-04-04 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-04T22:10:19-07:00 New Revision: a1935fd3809772c06f9a09fa151181642ae92b20 URL: https://github.com/llvm/llvm-project/commit/a1935fd3809772c06f9a09fa151181642ae92b20 DIFF: https://github.com/llvm/llvm-project/commit/a1935fd3809772c06f9a09fa151181642ae92b20.diff

[clang] [X86][AVX10.2] Replace nepbh with bf16 to match with others, NFCI (PR #134240)

2025-04-04 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - cheers https://github.com/llvm/llvm-project/pull/134240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-04 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays edited https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-04-04 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I'd say you can merge it once CI is green. https://github.com/llvm/llvm-project/pull/132252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-04 Thread Kaitlin Peng via cfe-commits
@@ -253,6 +253,37 @@ const inline float length(__detail::HLSL_FIXED_VECTOR X) { return __detail::length_vec_impl(X); } +//===--===// +// lit builtins +//===--

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-04-04 Thread Daniel Chen via cfe-commits
@@ -109,7 +109,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib) set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH "Path where built compiler-rt libraries should be instal

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-04 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/134310 >From 44f9ccd6b4104fb07ad9cf9581c41c6d473525ec Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 3 Apr 2025 14:53:29 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

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

2025-04-04 Thread Owen Pan via cfe-commits
@@ -4853,9 +4853,16 @@ void UnwrappedLineParser::readToken(int LevelDifference) { PreviousWasComment = FormatTok->is(tok::comment); while (!Line->InPPDirective && FormatTok->is(tok::hash) && - (!Style.isVerilog() || -Keywords.isVerilogPPDirective

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-04 Thread Erich Keane via cfe-commits
@@ -229,6 +229,10 @@ mlir::LogicalResult CIRGenFunction::emitSimpleStmt(const Stmt *s, else emitCompoundStmt(cast(*s)); break; + case Stmt::ContinueStmtClass: erichkeane wrote: Won't let me choose a better line, but line 222 is not accurate any

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Shilei Tian (shiltian) Changes In HIP, the Clang driver already sets `force-import-all` when ThinLTO is enabled. As a result, all imported functions get the `available_externally` linkage. However, these functions are later removed b

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-04 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/134476 In HIP, the Clang driver already sets `force-import-all` when ThinLTO is enabled. As a result, all imported functions get the `available_externally` linkage. However, these functions are later removed by the `El

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-04 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#134476** https://app.graphite.dev/github/pr/llvm/llvm-project/134476?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/134

[clang] [clang-format] Merge inline short functions for BS_Whitesmiths (PR #134473)

2025-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/134473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-04 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,64 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals all --version 5 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx900 -emit-llvm %s -o - | FileCheck --check-prefix=AMDGCN-GFX900 %s +// RUN: %cla

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-04 Thread Kaitlin Peng via cfe-commits
@@ -101,6 +101,16 @@ constexpr vector smoothstep_vec_impl(vector Min, vector Max, #endif } +template constexpr vector lit_impl(T NDotL, T NDotH, T M) { + bool DiffuseCond = NDotL < 0; + T Diffuse = select(DiffuseCond, 0, NDotL); + vector Result = {1, Diffuse, 0, 1}; + bo

[clang] [flang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-04-04 Thread Mészáros Gergely via cfe-commits
@@ -0,0 +1,472 @@ +#!/usr/bin/env python3 + +"""generate_unsupported_in_drivermode.py + +This script generates Lit regression test files that validate that options are only exposed to intended driver modes. + +The options and driver modes are parsed from Options.td, whose path sh

[clang] [clang][doc]: Merge the contents of identical entries. (PR #134089)

2025-04-04 Thread via cfe-commits
https://github.com/YLChenZ updated https://github.com/llvm/llvm-project/pull/134089 >From 319c55aef5c458ae4ac6c7f3f186d338f6fe2e37 Mon Sep 17 00:00:00 2001 From: YLChenZ Date: Wed, 2 Apr 2025 22:03:53 +0800 Subject: [PATCH 1/3] [llvm][doc]: Merge the contents of identical entries. --- clang/u

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

2025-04-04 Thread via cfe-commits
Sirraide wrote: > Yeah, there's a fair amount of moving parts. This is why I want to go with > the most conservative approach of rejecting unless the attributes are the > same. That seems reasonable given that we can always make this more permissive later on. https://github.com/llvm/llvm-pro

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

2025-04-04 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/133741 From 41af38793161b0f1535c98c4695c36e081ef2f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 27 Mar 2025 17:46:34 +0100 Subject: [PATCH 01/10] [Clang][AMDGPU] Ad

[clang] [HLSL] Handle incomplete array types (PR #133508)

2025-04-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/133508 This refactors the initialization list transformation code to handle incomplete array types. Fixes #132958 >From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date:

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

2025-04-04 Thread Owen Pan via cfe-commits
@@ -2832,6 +2832,23 @@ TEST_F(TokenAnnotatorTest, UnderstandTableGenTokens) { Tokens = Annotate("!cond"); EXPECT_TOKEN(Tokens[0], tok::identifier, TT_TableGenCondOperator); + // The paste operator should not be treated as a preprocessor directive even + // if it is on a

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread Owen Pan via cfe-commits
@@ -871,13 +871,81 @@ struct FormatStyle { /// void f() { bar(); } /// \endcode SFS_All, +/// Configure merge behavior using AllowShortFunctionsOnASingleLineOptions +SFS_Custom, }; /// Dependent on the value, ``int f() { return 0; }`` can be put on

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-04 Thread Owen Pan via cfe-commits
@@ -871,13 +871,81 @@ struct FormatStyle { /// void f() { bar(); } /// \endcode SFS_All, +/// Configure merge behavior using AllowShortFunctionsOnASingleLineOptions +SFS_Custom, }; /// Dependent on the value, ``int f() { return 0; }`` can be put on

[clang] [X86][AVX10.2] Replace nepbh with bf16 to match with others, NFCI (PR #134240)

2025-04-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vla` running on `linaro-g3-04` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/17/builds/7014 Here is the relevant piece of the buil

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
bassiounix wrote: How do I do the last one, the target support part? https://github.com/llvm/llvm-project/pull/134214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [NFC] [ASTMatchers] Share code of `forEachArgumentWithParamType` with UnsafeBufferUsage (PR #132387)

2025-04-04 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Friendly ping @AaronBallman to take a look. And also add @usx95 to get another pair of eyes and faster review in case Aaron is busy. https://github.com/llvm/llvm-project/pull/132387 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [Arm] Add more -mtp=cp15 tests (PR #134098)

2025-04-04 Thread David Green via cfe-commits
@@ -1,93 +1,93 @@ -// Test of the AArch32 values of -mtp=, checking that each one maps to -// the right target features. - -// RUN: %clang --target=armv7-linux -mtp=cp15 -### -S %s 2>&1 | \ -// RUN: FileCheck -check-prefix=ARMv7_THREAD_POINTER-HARD %s -// ARMv7_THREAD_POINTER-HARD

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-04 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: In general, I don't fully understand the scope of this patch. Surely, there's thousands of things that could be improved in the codebase. Which of those belong to this patch? Reviewers can always point out things that could be improved ad infinitum, leading to a patch with

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

2025-04-04 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/128019 >From c331c4c260b6432b6ae96723f78c16b189e9297a Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Thu, 20 Feb 2025 15:35:45 + Subject: [PATCH] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics Th

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-04 Thread Carlos Galvez via cfe-commits
@@ -260,7 +260,7 @@ static IntegerRange createFromType(const ASTContext &Context, llvm::APSInt LowerValue(PrecisionBits + 2, /*isUnsigned*/ false); LowerValue.setBit(PrecisionBits); LowerValue.setSignBit(); -return {LowerValue, UpperValue}; +return {std::mo

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread via cfe-commits
overmighty wrote: You could have multiple `// RUN:` lines with different targets and macro definitions. For example: ```cpp // RUN: %clang_cc1 -fsyntax-only -verify -pedantic -triple x86_64 -DSUPPORTED %s // RUN: %clang_cc1 -fsyntax-only -verify -pedantic -tri

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread via cfe-commits
@@ -978,6 +979,24 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, // we break out of the loop. for (; s != ThisTokEnd; ++s) { switch (*s) { +case 'b': // FP Suffix for "__bf16" +case 'B': + if (!Target.hasBFloat16Type()) +break

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-04 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. https://github.com/llvm/llvm-project/pull/134138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
@@ -2878,7 +2878,7 @@ class CXXDestructorDecl : public CXXMethodDecl { static CXXDestructorDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID); void setOperatorDelete(FunctionDecl *OD, Expr *ThisArg); - void setOperatorArrayDelete(FunctionDecl *OD, Expr *ThisArg); +

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > LGTM but do we need a release note? > > No, it is a fix for a regression caused by a patch committed a couple of days > ago. Excellent, thank you for confirming! LG as-is https://github.com/llvm/llvm-project/pull/134357 ___ c

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM but do we need a release note? https://github.com/llvm/llvm-project/pull/134357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Aaron Ballman via cfe-commits
@@ -2878,7 +2878,7 @@ class CXXDestructorDecl : public CXXMethodDecl { static CXXDestructorDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID); void setOperatorDelete(FunctionDecl *OD, Expr *ThisArg); - void setOperatorArrayDelete(FunctionDecl *OD, Expr *ThisArg); +

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-04 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/134138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Remove strict checks from init-aarch64.c (PR #134338)

2025-04-04 Thread via cfe-commits
SpencerAbson wrote: Agree with @arsenm. If you'd rather not `XFAIL` (or equivalent) this file in your downstream CI, perhaps you could have it autogenerated. A colleague of mine once wrote a script to do something similar https://github.com/llvm/llvm-project/pull/97829#issuecomment-221353566

[clang] [clang][doc]: Merge the contents of identical entries. (PR #134089)

2025-04-04 Thread via cfe-commits
YLChenZ wrote: > Oh yeah, that is not a good outcome. :-) I think Undocumented is a special > case. For this patch, I would not merge if the category is Undocumented. @AaronBallman Oh, I forgot the other merged entry that is slightly smaller compared to `Undocumented` like this: ![屏幕截图 2025-0

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

2025-04-04 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/133310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-04 Thread via cfe-commits
Author: Baranov Victor Date: 2025-04-04T14:21:48+02:00 New Revision: 547d054ef13c2ca5ec42f7061d8ba941c05605d9 URL: https://github.com/llvm/llvm-project/commit/547d054ef13c2ca5ec42f7061d8ba941c05605d9 DIFF: https://github.com/llvm/llvm-project/commit/547d054ef13c2ca5ec42f7061d8ba941c05605d9.diff

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

2025-04-04 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/133694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][doc]: Merge the contents of identical entries. (PR #134089)

2025-04-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Oh yeah, that is not a good outcome. :-) I think Undocumented is a special > > case. For this patch, I would not merge if the category is Undocumented. > > @AaronBallman Oh, I forgot the other merged entry that is slightly smaller > compared to `Undocumented` like this:

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

2025-04-04 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak approved this pull request. Thanks, LGTM! https://github.com/llvm/llvm-project/pull/133310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Aaron Ballman via cfe-commits
@@ -2878,7 +2878,7 @@ class CXXDestructorDecl : public CXXMethodDecl { static CXXDestructorDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID); void setOperatorDelete(FunctionDecl *OD, Expr *ThisArg); - void setOperatorArrayDelete(FunctionDecl *OD, Expr *ThisArg); +

[clang] [clang] Do not diagnose unused deleted operator delete[] (PR #134357)

2025-04-04 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > LGTM but do we need a release note? No, it is a regression caused by a patch committed a couple of days ago. https://github.com/llvm/llvm-project/pull/134357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Arm] Add more -mtp=cp15 tests (PR #134098)

2025-04-04 Thread Simon Tatham via cfe-commits
@@ -1,93 +1,93 @@ -// Test of the AArch32 values of -mtp=, checking that each one maps to -// the right target features. - -// RUN: %clang --target=armv7-linux -mtp=cp15 -### -S %s 2>&1 | \ -// RUN: FileCheck -check-prefix=ARMv7_THREAD_POINTER-HARD %s -// ARMv7_THREAD_POINTER-HARD

[clang] d02786e - [Sema] Handle AttributedType in template deduction with derived-to-base conversions (#134361)

2025-04-04 Thread via cfe-commits
Author: Ilya Biryukov Date: 2025-04-04T14:23:55+02:00 New Revision: d02786e7785ffa8c0aae4d89e9f6391bb4645500 URL: https://github.com/llvm/llvm-project/commit/d02786e7785ffa8c0aae4d89e9f6391bb4645500 DIFF: https://github.com/llvm/llvm-project/commit/d02786e7785ffa8c0aae4d89e9f6391bb4645500.diff

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-04 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett commented: I see that this would be breaking for code unintentionally relying on the features being omitted, but it makes sense to fix it nevertheless. I would have expected us to add the features all along. What does gcc/binutils do in this scenario? I don't t

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-04 Thread David Spickett via cfe-commits
@@ -38,6 +38,9 @@ Potentially Breaking Changes - Fix missing diagnostics for uses of declarations when performing typename access, such as when performing member access on a '[[deprecated]]' type alias. (#GH58547) +- For ARM targets, when using cc1as, the features included

[clang] [Clang][CodeGen] Respect -fwrapv-pointer when emitting struct GEPs (PR #134269)

2025-04-04 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > Usually we'd want to also insert `-fsanitize=pointer-overflow` > instrumentation in places where we respect `-fwrapv-pointer`. I'm not > entirely sure whether we want to do this here, as it will probably blow up > the amount of inserted instrumentation for little benefit... A

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-04 Thread Martin Storsjö via cfe-commits
@@ -0,0 +1,31 @@ +// Ensures that when targeting an ARM target with an Asm file, clang +// collects the features from the FPU. This is critical in the +// activation of NEON for supported targets. The Cortex-R52 will be +// used and tested for VFP and NEON Support + +// RUN: %clan

[clang] [clang] Add `__bf16` Type Support Macros With Literal Suffix Support (PR #134214)

2025-04-04 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/134214 >From 620bdbed2b372b97b66147684d4ded5b666c7786 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Thu, 3 Apr 2025 10:08:59 +0200 Subject: [PATCH 01/11] add `bf16`/`BF16` suffix support --- clang/include/clang/

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-04 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This is a smaller, self-isolated change split out from #130623 - in order to fix a regression from 8fa0f0efce5fb81eb422e6d7eec74c66dafef4a3 as noted by @anemet in https://github.com/llvm/llvm-project/pull/122095#discussion_r2027399582; in a form that hopefully can be considere

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-04 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/134366 Previously, FPU features were not collected when forming a list of features for the Assembler. This fixes a regression from 8fa0f0efce5fb81eb422e6d7eec74c66dafef4a3, which caused VFPv4 to be unavailable if as

[clang] [Clang] [ARM] Ensure FPU Features are collected when using the Clang Assembler (PR #134366)

2025-04-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Martin Storsjö (mstorsjo) Changes Previously, FPU features were not collected when forming a list of features for the Assembler. This fixes a regression from 8fa0f0efce5fb81eb422e6d7eec74c66dafef4a3, which caused VFPv4 to be unavailable

[clang] [llvm] [AARCH64] Add FEAT_SSVE_FEXPA and fix unsupported features list (PR #134368)

2025-04-04 Thread via cfe-commits
https://github.com/Lukacma created https://github.com/llvm/llvm-project/pull/134368 This patch adds new feature introduced in [2025-03 release](https://developer.arm.com/documentation/ddi0602/2025-03/SVE-Instructions/FEXPA--Floating-point-exponential-accelerator-) and changes feature requireme

<    1   2   3   4   5   6   7   8   9   >