[clang] [clang] Mark constructors with invalid initializers as invalid (PR #137773)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes If a member or base initializer of a constructor turns out to be invalid, mark the entire constructor as invalid. --- Full diff: https://github.com/llvm/llvm-project/pull/137773.diff 5 Files Affected: -

[clang-tools-extra] [clang-tidy] Do not pass any file when listing checks in run_clang_ti… (PR #137286)

2025-04-29 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: [014ab73](https://github.com/llvm/llvm-project/commit/014ab736dc741f24c007f9861e24b31faba0e1e7) https://github.com/llvm/llvm-project/actions/runs/14727657605 Please manually backport the fix and push it to your github fork. Once this is done, please cre

[clang-tools-extra] [clang-tidy] Do not pass any file when listing checks in run_clang_ti… (PR #137286)

2025-04-29 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#137775 https://github.com/llvm/llvm-project/pull/137286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread Feng Zou via cfe-commits
@@ -0,0 +1,236 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// 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: Ap

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-04-29 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: I don't mind the exact interface too much tbh, I would just like to be able to run clang-format again to only sort includes without doing any other formatting. Happy to implement whatever makes folks happy. https://github.com/llvm/llvm-project/pull/137617 ___

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread Shengchen Kan via cfe-commits
@@ -1257,6 +1259,26 @@ inline bool isX86_64ExtendedReg(MCRegister Reg) { return false; } +inline const TargetRegisterClass * +constrainRegClassToNonRex2(const TargetRegisterClass *RC) { KanRobert wrote: It seems it's not appropriate place. X86BaseInfo is us

[clang] [clang][AArch64] Don't define features macros when explicitly disabled (PR #132167)

2025-04-29 Thread via cfe-commits
XiaShark wrote: solve in a more generalized way, please review. https://github.com/llvm/llvm-project/pull/132167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-29 Thread David Green via cfe-commits
https://github.com/davemgreen updated https://github.com/llvm/llvm-project/pull/135064 >From d9e27ec881ec493174f3aee7a4faec567640e5e8 Mon Sep 17 00:00:00 2001 From: David Green Date: Wed, 9 Apr 2025 11:18:25 +0100 Subject: [PATCH 1/3] [AArch64] Add a test case for the coerced arguments. NFC --

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-04-29 Thread David Green via cfe-commits
davemgreen wrote: Rebase and ping - thanks. https://github.com/llvm/llvm-project/pull/135064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-29 Thread Jay Foad via cfe-commits
jayfoad wrote: > I still think we need an intrinsic here because a load + an addtid store can > be scheduled much different from the asynchronous "gather to LDS" - and > because we don't want this load/store to not be optimized IMO the intrinsic should only be added as a last resort if we real

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-04-29 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 ready_for_review https://github.com/llvm/llvm-project/pull/137769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Aniket Lal (lalaniket8) Changes OpenCL Kernels body is emitted as stubs and the kernel is emitted as call to respective stub. (https://github.com/llvm/llvm-project/pull/115821). The stub function should be alwaysinlined, since cal

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Aniket Lal (lalaniket8) Changes OpenCL Kernels body is emitted as stubs and the kernel is emitted as call to respective stub. (https://github.com/llvm/llvm-project/pull/115821). The stub function should be alwaysinlined, since call

[clang] [ARM][Driver] Fix i8mm feature string (PR #137771)

2025-04-29 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 created https://github.com/llvm/llvm-project/pull/137771 #137595 changed the behaviour for SIMD on ARM to ensure it is enabled and disabled correctly depending on the options used by the user. In this, the functionality to disable all features that depend on SIMD w

[clang] [Driver] Simplify string comparisons (NFC) (PR #137756)

2025-04-29 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/137756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM][Driver] Ensure NEON is enabled and disabled correctly (PR #137595)

2025-04-29 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 closed https://github.com/llvm/llvm-project/pull/137595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Start implementing builtin_is_within_lifetime (PR #137765)

2025-04-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137765 None >From 609b14ff51520373247a85dc27e11ccc7335cee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 29 Apr 2025 09:28:39 +0200 Subject: [PATCH] [clang][bytecode] Start implementing bui

[clang] 4bf356b - [clang][bytecode] Start implementing builtin_is_within_lifetime (#137765)

2025-04-29 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-29T10:57:30+02:00 New Revision: 4bf356bbd25ef5950de92b9e66cc8a2d3af583d9 URL: https://github.com/llvm/llvm-project/commit/4bf356bbd25ef5950de92b9e66cc8a2d3af583d9 DIFF: https://github.com/llvm/llvm-project/commit/4bf356bbd25ef5950de92b9e66cc8a2d3af583d9.diff L

[clang] [clang][bytecode] Start implementing builtin_is_within_lifetime (PR #137765)

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

[clang] clang-format: Add -disable-format option (PR #137617)

2025-04-29 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: Can't you just run the `llvm-include-order` clang-tidy check instead? https://github.com/llvm/llvm-project/pull/137617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM][Driver] Fix i8mm feature string (PR #137771)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jack Styles (Stylie777) Changes #137595 changed the behaviour for SIMD on ARM to ensure it is enabled and disabled correctly depending on the options used by the user. In this, the functionality to disable all features that depend on SIMD

[clang] [ARM][Driver] Fix i8mm feature string (PR #137771)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm @llvm/pr-subscribers-clang-driver Author: Jack Styles (Stylie777) Changes #137595 changed the behaviour for SIMD on ARM to ensure it is enabled and disabled correctly depending on the options used by the user. In this, the functionality to

[clang] [ARM][Driver] Fix i8mm feature string (PR #137771)

2025-04-29 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
@@ -554,6 +554,22 @@ class VectorType : public Type { return VectorType::get(VTy->getElementType(), EltCnt * 2); } + /// This static method returns a VectorType with the same size-in-bits as + /// SizeTy but with an element type that matches the scalar type of EltTy. -

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
@@ -80,7 +80,9 @@ fixed_bool32_t from_vbool32_t(vbool32_t type) { // // CHECK-128-LABEL: @to_vbool32_t( // CHECK-128-NEXT: entry: -// CHECK-128-NEXT:ret [[TYPE_COERCE:%.*]] +// CHECK-128-NEXT:[[SAVED_VALUE:%.*]] = alloca <1 x i8>, align 1 +// CHECK-128-NEXT: [[SAV

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
@@ -554,6 +554,22 @@ class VectorType : public Type { return VectorType::get(VTy->getElementType(), EltCnt * 2); } + /// This static method returns a VectorType with the same size-in-bits as + /// SizeTy but with an element type that matches the scalar type of EltTy. +

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Apart from the RISCV test changes this looks reasonable to me. https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Mark constructors with invalid initializers as invalid (PR #137773)

2025-04-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/137773 >From 53dea9e3d96c622c7e1ffc892117723ff1d3831c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 29 Apr 2025 11:11:08 +0200 Subject: [PATCH] [clang] Mark constructors with invalid initiali

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-29 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-29 Thread Michael Kruse via cfe-commits
@@ -2264,6 +2263,14 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::createSections( AfterIP = {FiniBB, FiniBB->begin()}; } + // Now we can fix the dummy branch to point to the right place + if (!CancellationBranches.empty()) { Meinersbur wro

[clang] [llvm] [mlir] [mlir][OpenMP] Convert omp.cancel sections to LLVMIR (PR #137193)

2025-04-29 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/137193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OMPIRBuilder] Don't discard the debug record from entry block. (PR #135161)

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

[libclc] [libclc] Move fmin/fmax to the CLC library (PR #128506)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/128506 >From 5c367b8c87bf07f851778f391e5130a0fd0b193b Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 24 Feb 2025 12:25:22 + Subject: [PATCH] [libclc] Optimize generic CLC fmin/fmax The CLC fmin/fmax

[libclc] [libclc] Optimize generic CLC fmin/fmax (PR #128506)

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

[libclc] [libclc] Optimize generic CLC fmin/fmax (PR #128506)

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

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-29 Thread Filip Milosevic via cfe-commits
@@ -1153,6 +1153,8 @@ template <> struct MappingTraits { IO.mapOptional("SpaceAfterLogicalNot", Style.SpaceAfterLogicalNot); IO.mapOptional("SpaceAfterTemplateKeyword", Style.SpaceAfterTemplateKeyword); +IO.mapOptional("SpaceAfterOperatorKeyword",

[clang] [llvm] [TargetParser] Fix flaky installs of generated headers (PR #137853)

2025-04-29 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/137853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Kaitlin Peng via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 %s -triple spirv-pc-vulkan-compute -verify + +typedef float float2 __attribute__((ext_vector_type(2))); + +float2 test_no_second_arg(float2 p0) { + return __builtin_spirv_refract(p0); + // expected-error@-1 {{too few arguments to function cal

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-29 Thread John McCall via cfe-commits
rjmccall wrote: The ObjC `@` is essentially an escape into a completely different grammar, and it doesn't matter whether the following identifier is a keyword or not in the base language. This warning should never kick in on that identifier. Similarly, ObjC selector components exist outside of

[clang] 705ceff - [TargetParser] Fix flaky installs of generated headers (#137853)

2025-04-29 Thread via cfe-commits
Author: Shoaib Meenai Date: 2025-04-29T12:13:38-07:00 New Revision: 705ceff7c1fc328151a6506a91773aac429ccee3 URL: https://github.com/llvm/llvm-project/commit/705ceff7c1fc328151a6506a91773aac429ccee3 DIFF: https://github.com/llvm/llvm-project/commit/705ceff7c1fc328151a6506a91773aac429ccee3.diff

[clang] [llvm] [TargetParser] Fix flaky installs of generated headers (PR #137853)

2025-04-29 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai closed https://github.com/llvm/llvm-project/pull/137853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Farzon Lotfi via cfe-commits
@@ -71,6 +71,27 @@ constexpr vector reflect_vec_impl(vector I, vector N) { #endif } +template constexpr T refract_impl(T I, T N, T eta) { + T k = 1 - eta * eta * (1 - (N * I * N *I)); farzonl wrote: Install clangd vscode extension it has a tool that will f

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
@@ -365,6 +365,32 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model, TuneVXRMPipelineFlush, TunePostRAScheduler]>; +def SIFIVE_P870 : RISCVProcessorModel<"sifive-p870", NoSched

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-04-29 Thread Carlos Galvez via cfe-commits
@@ -337,8 +337,7 @@ Allow empty enabled checks. This suppresses the "no checks enabled" error when disabling all of the checks. )"), - cl::init(false), - cl::cat(ClangTidyCategory)); +

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-04-29 Thread Carlos Galvez via cfe-commits
@@ -370,8 +369,8 @@ static void printStats(const ClangTidyStats &Stats) { } } -static std::unique_ptr createOptionsProvider( - llvm::IntrusiveRefCntPtr FS) { +static std::unique_ptr +createOptionsProvider(llvm::IntrusiveRefCntPtr FS) { carlosgalvezp wrote:

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Kaitlin Peng via cfe-commits
@@ -89,7 +132,7 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned BuiltinID, QualType ArgTyB = B.get()->getType(); auto *VTyB = ArgTyB->getAs(); if (VTyB == nullptr) { - SemaRef.Diag(A.get()->getBeginLoc(), + SemaRef.Diag(B.get()->getBeginLoc(), -

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Kaitlin Peng via cfe-commits
@@ -71,6 +71,27 @@ constexpr vector reflect_vec_impl(vector I, vector N) { #endif } +template constexpr T refract_impl(T I, T N, T eta) { + T k = 1 - eta * eta * (1 - (N * I * N *I)); kmpeng wrote: Variables should [start with an upper-case letter](https:

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-29 Thread Filip Milosevic via cfe-commits
@@ -1639,6 +1641,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SpaceAfterCStyleCast = false; LLVMStyle.SpaceAfterLogicalNot = false; LLVMStyle.SpaceAfterTemplateKeyword = true; + LLVMStyle.SpaceAfterOperatorKeyword = false; --

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng deleted https://github.com/llvm/llvm-project/pull/136026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Min-Yih Hsu (mshockwave) Changes Sscofpmf is already in RVA23S64 and Zicsr is in RVA20U64. I also added a test to check Sscofpmf. This is effectively an NFC. --- This is found by #137864 --- Full diff: https://github.com/llvm/llvm-p

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-04-29 Thread Carlos Galvez via cfe-commits
@@ -266,7 +266,7 @@ ClangTidyOptions ClangTidyContext::getOptionsForFile(StringRef File) const { // Merge options on top of getDefaults() as a safeguard against options with // unset values. return ClangTidyOptions::getDefaults().merge( - OptionsProvider->getOptions

[clang] [llvm] [RISCV] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave created https://github.com/llvm/llvm-project/pull/137865 Sscofpmf is already in RVA23S64 and Zicsr is in RVA20U64. I also added a test to check Sscofpmf. This is effectively an NFC. --- This is found by #137864 >From 3ac537e4fe391464870254d0a9c81fe9f58c195a

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/136026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #136026)

2025-04-29 Thread Kaitlin Peng via cfe-commits
@@ -89,7 +132,7 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned BuiltinID, QualType ArgTyB = B.get()->getType(); auto *VTyB = ArgTyB->getAs(); if (VTyB == nullptr) { - SemaRef.Diag(A.get()->getBeginLoc(), + SemaRef.Diag(B.get()->getBeginLoc(), -

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-04-29 Thread Carlos Galvez via cfe-commits
@@ -46,20 +46,20 @@ TEST(ClangTidyOptionsProvider, InMemoryFileSystems) { FileOptionsProvider FileOpt({}, {}, {}, FileSystem); - ClangTidyOptions File1Options = + llvm::ErrorOr File1Options = FileOpt.getOptions("ProjectRoot/SubDir1/File.cpp"); - ClangTidyOptions F

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-04-29 Thread Carlos Galvez via cfe-commits
@@ -624,21 +623,29 @@ int clangTidyMain(int argc, const char **argv) { } SmallString<256> FilePath = makeAbsolute(FileName); - ClangTidyOptions EffectiveOptions = OptionsProvider->getOptions(FilePath); + llvm::ErrorOr EffectiveOptions = + OptionsProvider->getOptions

[clang-tools-extra] [clang-tidy] Return error code on config parse error (PR #136167)

2025-04-29 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp requested changes to this pull request. Please document the change in the Release Notes https://github.com/llvm/llvm-project/pull/136167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-04-29 Thread Florian Mayer via cfe-commits
fmayer wrote: This changed the size of the following struct: ``` #include struct A { bool value : 64 = false; uint64_t : 448; }; static_assert(sizeof(A) == 64); ``` Used to be 64 but became 80. I bisected to this change. ``` $ llvm-project/build/bin/clang++ -target aarch64 -c f

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-04-29 Thread Christudasan Devadasan via cfe-commits
cdevadas wrote: > In practice this should be a single use of an internal function and should > not require this hint. Is this papering over a different issue? Why do you think it is an internal function? I thought it's an externally callable stub. https://github.com/llvm/llvm-project/pull/137

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks commented: You definitely need some tests. And I'm not sure if everyone would like that, of if it should be an option. https://github.com/llvm/llvm-project/pull/137840 ___ cfe-commits mailing list cfe-commits@list

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/137840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Björn Schäpers via cfe-commits
@@ -3219,17 +3219,19 @@ static void sortCppIncludes(const FormatStyle &Style, if (Style.SortIncludes == FormatStyle::SI_CaseInsensitive) { stable_sort(Indices, [&](unsigned LHSI, unsigned RHSI) { - const auto LHSFilenameLower = Includes[LHSI].Filename.lower(); -

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-29 Thread Björn Schäpers via cfe-commits
@@ -1639,6 +1641,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SpaceAfterCStyleCast = false; LLVMStyle.SpaceAfterLogicalNot = false; LLVMStyle.SpaceAfterTemplateKeyword = true; + LLVMStyle.SpaceAfterOperatorKeyword = false; --

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-29 Thread Björn Schäpers via cfe-commits
@@ -5433,6 +5441,7 @@ struct FormatStyle { SpaceAfterCStyleCast == R.SpaceAfterCStyleCast && SpaceAfterLogicalNot == R.SpaceAfterLogicalNot && SpaceAfterTemplateKeyword == R.SpaceAfterTemplateKeyword && + SpaceAfterOperatorKeyword == R

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-29 Thread Björn Schäpers via cfe-commits
@@ -1153,6 +1153,8 @@ template <> struct MappingTraits { IO.mapOptional("SpaceAfterLogicalNot", Style.SpaceAfterLogicalNot); IO.mapOptional("SpaceAfterTemplateKeyword", Style.SpaceAfterTemplateKeyword); +IO.mapOptional("SpaceAfterOperatorKeyword",

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137234 >From 56a3f3cd282e9bd5ef9014e4125380e0d9685121 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 24 Apr 2025 14:17:42 -0400 Subject: [PATCH 01/17] [C] Diagnose use of C++ keywords in C This adds a ne

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-04-29 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > > > > > @zahiraam @AaronBallman a different option would be to add a signed > > > > > vs unsigned storage option to the `OPTION` and `BENIGN_ENUM_LANGOPT` > > > > > macros so we can store negative enumerations safely > > > > > > > > > > > > I think I would prefer this solution

[clang] [llvm] [RISCV] Xqccmp v0.3 (PR #137854)

2025-04-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/137854 >From f156620203b61fbe48c80b4b45c451f9a6c6eed9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 29 Apr 2025 11:10:54 -0700 Subject: [PATCH 1/2] [RISCV] Xqccmp v0.3 --- clang/test/Driver/print-supported-ext

[clang] [clang-format] Add OneLineFormatOffRegex option (PR #137577)

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

[clang] 7d91cf4 - [CIR] Add support for compound assignment statements (#137740)

2025-04-29 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-29T11:31:04-07:00 New Revision: 7d91cf4bab8c9c4daa3d3a9fca87778d6ccacb6b URL: https://github.com/llvm/llvm-project/commit/7d91cf4bab8c9c4daa3d3a9fca87778d6ccacb6b DIFF: https://github.com/llvm/llvm-project/commit/7d91cf4bab8c9c4daa3d3a9fca87778d6ccacb6b.diff L

[clang] [CIR] Add support for compound assignment statements (PR #137740)

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

[clang] 743c32e - [clang] Disable libclang abort death test after merging unittests

2025-04-29 Thread Reid Kleckner via cfe-commits
Author: Reid Kleckner Date: 2025-04-29T11:27:58-07:00 New Revision: 743c32eb8195c248c699c61ffbac141947b8e6ab URL: https://github.com/llvm/llvm-project/commit/743c32eb8195c248c699c61ffbac141947b8e6ab DIFF: https://github.com/llvm/llvm-project/commit/743c32eb8195c248c699c61ffbac141947b8e6ab.diff

[clang] [clang-format] Add ApplyAlwaysOnePerLineToTemplateArguments option (PR #137544)

2025-04-29 Thread Lorenzo Mauro via cfe-commits
LorenzoMauro wrote: Thank you @HazardyKnusperkeks for the review. @owenca I agree — I also don't see why anyone would want the current behavior, so it definitely seems like a bug to me as well. It's absolutely possible to fix this without introducing a new option: the check I wrote could simpl

[clang] [CIR] Add support for compound assignment statements (PR #137740)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `amdgpu-offload-rhel-9-cmake-build-only` running on `rocm-docker-rhel-9` while building `clang` at step 2 "update-annotated-scripts". Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/7835 He

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Adding @rjmccall because this touches on Objective-C `@` keyword handling. (Note, maybe we want `-Wc++-compat` to be disabled in Objective-C entirely and we should have `-Wobjc++-compat` instead? `[foo bar];` is not valid C++, but I doubt anyone wants that diagnosed in Obje

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
DaanDeMeyer wrote: > You definitely need some tests. And I'm not sure if everyone would like that, > of if it should be an option. I was hoping to get some feedback on whether it should be an option or not before adding tests. https://github.com/llvm/llvm-project/pull/137840 _

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-29 Thread via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-29 Thread Filip Milosevic via cfe-commits
https://github.com/MightyFilipns updated https://github.com/llvm/llvm-project/pull/137610 >From 9b1b940c23e53591dd4234d789fc44720e220554 Mon Sep 17 00:00:00 2001 From: MightyFilipns Date: Mon, 28 Apr 2025 11:54:20 +0200 Subject: [PATCH] clang-format: Add SpaceAfterOperatorKeyword option --- c

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-29 Thread David Truby via cfe-commits
DavidTruby wrote: This fixes an issue I was seeing caused by #130742 that caused GNU m4 and make builds to segfault, which I assume was caused by #137833. I don't understand the code here well enough to give an actual review, but it'd be great to see this merged as m4/make builds generating ba

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-04-29 Thread Filip Milosevic via cfe-commits
@@ -5433,6 +5441,7 @@ struct FormatStyle { SpaceAfterCStyleCast == R.SpaceAfterCStyleCast && SpaceAfterLogicalNot == R.SpaceAfterLogicalNot && SpaceAfterTemplateKeyword == R.SpaceAfterTemplateKeyword && + SpaceAfterOperatorKeyword == R

[clang] [Clang][CodeGen] Check `isUnderlyingBasePointerConstantNull` in `emitPointerArithmetic` (PR #137849)

2025-04-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: While we should omit inbounds, I think it would be good to not suppress the sanitizer. If the sanitizer doesn't warn about it, then things will never get better :( https://github.com/llvm/llvm-project/pull/137849 _

[clang] [Clang][CodeGen] Add workaround for old glibc `__PTR_ALIGN` macro (PR #137851)

2025-04-29 Thread Eli Friedman via cfe-commits
@@ -4820,6 +4820,9 @@ bool CodeGenFunction::isUnderlyingBasePointerConstantNull(const Expr *E) { const Expr *UnderlyingBaseExpr = E->IgnoreParens(); while (auto *BaseMemberExpr = dyn_cast(UnderlyingBaseExpr)) UnderlyingBaseExpr = BaseMemberExpr->getBase()->IgnoreParens

[clang] [Clang][CodeGen] Check `isUnderlyingBasePointerConstantNull` in `emitPointerArithmetic` (PR #137849)

2025-04-29 Thread Eli Friedman via cfe-commits
@@ -4238,7 +4238,8 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, else elemTy = CGF.ConvertTypeForMem(elementType); - if (CGF.getLangOpts().PointerOverflowDefined) + if (CGF.getLangOpts().PointerOverflowDefined || + CGF.isUnderlyingBasePointerConstan

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-29 Thread Marco Elver via cfe-commits
@@ -235,6 +266,20 @@ class FactSet { return false; } + std::optional replaceLock(FactManager &FM, iterator It, +std::unique_ptr Entry) { +if (It == end()) + return std::nullopt; +FactID F = FM.newFact(std::move(Entry)); +

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-29 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: Well, if y'all want to go add a pattern for this and eventually deprecate the intrinsics I'm all ears, but we're trying to use these instructions now https://github.com/llvm/llvm-project/pull/137425 ___ cfe-commits mailing list cfe-co

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-04-29 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: I've added a verbose version of the assertion that uses `__builtin_printf` (I could not figure out a way to correctly emit something to `stderr` from device code in a generic way without including `cstdio`. ```cpp #ifdef _GLIBCXX_VERBOSE_ASSERT __attribute__((device, noreturn

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv7-global-isel` running on `linaro-clang-armv7-global-isel` while building `llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/39/builds/5888 Here is the releva

[clang] bd3dde0 - [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (#137068)

2025-04-29 Thread via cfe-commits
Author: Cyndy Ishida Date: 2025-04-29T08:38:33-07:00 New Revision: bd3dde0f871cd71a797ba5da3070fa3ddbc48828 URL: https://github.com/llvm/llvm-project/commit/bd3dde0f871cd71a797ba5da3070fa3ddbc48828 DIFF: https://github.com/llvm/llvm-project/commit/bd3dde0f871cd71a797ba5da3070fa3ddbc48828.diff

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/137068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Farzon Lotfi via cfe-commits
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = { static_assert(std::size(BuiltinInfos) == NumBuiltins); llvm::SmallVector -SPIRVTargetInfo::getTargetBuiltins() const { - return {{&BuiltinStrings, BuiltinInfos}}; +BaseSPIRTargetInfo::getTargetBuiltins() con

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/137068 >From bb548cb398714ae77b6fd2f782b172d8b9032a2f Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Wed, 23 Apr 2025 14:47:17 -0700 Subject: [PATCH 1/3] [clang][Modules] Diagnose mismatching pcm dependencies in

[libclc] [libclc] Move fdim to CLC library; simplify (PR #137811)

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

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

2025-04-29 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] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/137805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
@@ -26,11 +26,15 @@ typedef vbool64_t fixed_bool64_t __attribute__((riscv_rvv_vector_bits(__riscv_v_ // // CHECK-128-LABEL: @call_bool32_ff( // CHECK-128-NEXT: entry: +// CHECK-128-NEXT:[[SAVED_VALUE:%.*]] = alloca <1 x i8>, align 1 nikic wrote: Looks li

<    1   2   3   4   5   >