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

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

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

2025-04-10 Thread Eli Friedman via cfe-commits
Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= Message-ID: In-Reply-To: efriedma-quic wrote: Oh, hmm, we have range metadata, but it gets killed by mem2reg. So instcombine could do the transform, but it runs too late

[clang] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-10 Thread Maksim Ivanov via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [clang-tools-extra] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-tidy Author: Matheus Izvekov (mizvekov) Changes Currently when printing a template argument of expression type, the expression is converted immediately into a string to be sent to the diagnostic engine, unsing a fake La

[clang] a1bca4b - [clang] Make tests write to /dev/null if output is not needed (#135242)

2025-04-10 Thread via cfe-commits
Author: Pranav Kant Date: 2025-04-10T12:50:05-07:00 New Revision: a1bca4ba3714bffac5dc27d286b5bd4fcdcc40ab URL: https://github.com/llvm/llvm-project/commit/a1bca4ba3714bffac5dc27d286b5bd4fcdcc40ab DIFF: https://github.com/llvm/llvm-project/commit/a1bca4ba3714bffac5dc27d286b5bd4fcdcc40ab.diff L

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/135147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -4,4 +4,17 @@ void acc_init(void) { // CHECK: cir.func @acc_init() { #pragma acc init // CHECK-NEXT: acc.init loc(#{{[a-zA-Z0-9]+}}){{$}} + +#pragma acc init device_type(*) erichkeane wrote: This will faithfully represent them, like this: ``` // CHECK-N

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -37,6 +50,32 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("Unsupported format for long double"); } + /// Get a CIR record kind from a AST declaration tag. + cir::StructType::RecordKind getRecordKind(const clang::TagTypeKind kind) { +

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-10 Thread Martin Storsjö via cfe-commits
@@ -679,21 +679,17 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind; (void)llvm::ARM::getFPUFeatures(FPUKind, Features); } else { -bool Generic = true; -if (!ForAS) {

[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

2025-04-10 Thread Alex MacLean via cfe-commits
@@ -1548,6 +1548,45 @@ let TargetPrefix = "nvvm" in { Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoMem, IntrNoCallback]>; def int_nvvm_e5m2x2_to_f16x2_rn_relu : ClangBuiltin<"__nvvm_e5m2x2_to_f16x2_rn_relu">, Intrinsic<[llvm_v2f16_ty], [llvm_i16_ty], [IntrNoM

[clang] [clang][test] Improve unit tests for Fixed point AST matchers. (PR #134398)

2025-04-10 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/134398 >From 655a39e11fb27aef26d12b9e3401e4cfdfd4f12a Mon Sep 17 00:00:00 2001 From: Vladislav Aranov Date: Fri, 4 Apr 2025 17:18:34 +0200 Subject: [PATCH] [clang][test] Improve unit tests for Fixed point AST matchers.

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-10 Thread Erich Keane via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/135013 >From 99190952174f334642ec237596969f9b0c846411 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Apr 2025 09:51:49 -0400 Subject: [PATCH 1/3] Fix crash with align_value diagnostic reporting We were

[clang] 727f392 - [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (#131070)

2025-04-10 Thread via cfe-commits
Author: Deric C. Date: 2025-04-10T16:06:48-07:00 New Revision: 727f3921e7af7a4b0f1e59635ebb99a52bd173c3 URL: https://github.com/llvm/llvm-project/commit/727f3921e7af7a4b0f1e59635ebb99a52bd173c3 DIFF: https://github.com/llvm/llvm-project/commit/727f3921e7af7a4b0f1e59635ebb99a52bd173c3.diff LOG:

[clang] [HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (PR #134683)

2025-04-10 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/134683 >From 87308905daa9093caef9ffb920bf9968c0bfb597 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Mon, 7 Apr 2025 09:31:28 -0700 Subject: [PATCH 1/3] desguar constantarraytype --- clang/lib/CodeGen/HLSLBufferLayou

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

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

[clang] [clang-tools-extra] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-10 Thread Matheus Izvekov via cfe-commits
@@ -493,8 +493,8 @@ DeduceNullPtrTemplateArgument(Sema &S, TemplateParameterList *TemplateParams, : CK_NullToPointer) .get(); return DeduceNonTypeTemplateArgument( - S, TemplateParams, NTTP, Ded

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-04-10 Thread Victor Campos via cfe-commits
https://github.com/vhscampos updated https://github.com/llvm/llvm-project/pull/133716 >From bb649666995a2642c5eea944e55c0a38503ed7bf Mon Sep 17 00:00:00 2001 From: Victor Campos Date: Fri, 28 Mar 2025 15:55:07 + Subject: [PATCH 1/5] Mark CXX module initializer with PACBTI attributes The CX

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

2025-04-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/8072 Here is the releva

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-10 Thread Aaron Ballman via cfe-commits
@@ -4383,7 +4383,6 @@ static void handleAlignValueAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } void Sema::AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E) { - AlignValueAttr TmpAttr(Context, CI, E); AaronBallman wrote: I can fix those

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-10 Thread David Green via cfe-commits
@@ -679,21 +679,17 @@ llvm::ARM::FPUKind arm::getARMTargetFeatures(const Driver &D, CPUArgFPUKind != llvm::ARM::FK_INVALID ? CPUArgFPUKind : ArchArgFPUKind; (void)llvm::ARM::getFPUFeatures(FPUKind, Features); } else { -bool Generic = true; -if (!ForAS) {

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-10 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/134698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-10 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/133107 >From c46eda67cd7434dcce5c1f29125a940dc4ff64ba Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Wed, 26 Mar 2025 18:29:38 +0300 Subject: [PATCH 1/4] [CLANG] Enable alignas after GNU attributes --- clang/l

[clang] Support '-fmodule-file-home-is-cwd' for C++ modules. (PR #135147)

2025-04-10 Thread Michael Park via cfe-commits
mpark wrote: > > But if we want relocatable modules without using > > `-fmodules-embed-all-files` though, is there a solution for that? > > Do you use `-no-canonical-prefixes`? Hi Richard! Hm, no we do not. I haven't seen this before. I can try it though 🤔 https://github.com/llvm/llvm-project

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-10 Thread Yaxun Liu via cfe-commits
@@ -1233,6 +1233,10 @@ def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">, Flags<[HelpHidden]>, HelpText<"Compression level for offload device binaries (HIP only)">; +def offload_jobs_EQ : Joined<["--"], "offload-jobs=">, + HelpText<"Set the

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-04-10 Thread Younan Zhang via cfe-commits
@@ -5346,27 +5348,11 @@ AddRecordMembersCompletionResults(Sema &SemaRef, ResultBuilder &Results, // Returns the RecordDecl inside the BaseType, falling back to primary template // in case of specializations. Since we might not have a decl for the // instantiation/specializatio

[clang] [clang][bytecode] Fix various issues with multidimensional arrarys (PR #134628)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This issue is very convoluted, but in essence, in the new version: For a Pointer P that points to the root of a multidimensional, primitive array: `P.narrow()` does nothing. `P.atIndex(0)` points `P[0]` `P.a

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

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

[clang] [llvm] Support z17 processor name and scheduler description (PR #135254)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ulrich Weigand (uweigand) Changes The recently announced IBM z17 processor implements the architecture already supported as "arch15" in LLVM. This patch adds support for "z17" as an alternate architecture name for arch15. This patch als

[clang] [llvm] Support z17 processor name and scheduler description (PR #135254)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Ulrich Weigand (uweigand) Changes The recently announced IBM z17 processor implements the architecture already supported as "arch15" in LLVM. This patch adds support for "z17" as an alternate architecture name for arch15. This

[clang] [llvm] Support z17 processor name and scheduler description (PR #135254)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-llvm-analysis Author: Ulrich Weigand (uweigand) Changes The recently announced IBM z17 processor implements the architecture already supported as "arch15" in LLVM. This patch adds support for "z17" as an alternate architecture

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix AS of globals and set the default AS to 4 (PR #135251)

2025-04-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and set the default AS to 4 (PR #135251)

2025-04-10 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Support z17 processor name and scheduler description (PR #135254)

2025-04-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions c,cpp -- clang/lib/Basic/Targets/SystemZ.cpp clang/test/Cod

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-04-10 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: > unsigned int foo(unsigned char x) > { > return ~(1< 'int' to 'unsigned int' > } > ``` Could you help me understand why clang is emitting the warning? Isn't it semantically equivalent to the following code? ``` unsigned int foo(unsigned char x) { int i = ~(1

[clang] [clang][test][NFC] Use -fdriver-only over /dev/null (PR #135255)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Paul Kirth (ilovepi) Changes Tests should avoid using platform dependent behavior, like /dev/null when possible. -fdriver-only should stop clang even earlier, and avoid any non-diagnostic output. --- Full diff: https://github.com/ll

[clang] [clang][test][NFC] Use -fdriver-only over /dev/null (PR #135255)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Kirth (ilovepi) Changes Tests should avoid using platform dependent behavior, like /dev/null when possible. -fdriver-only should stop clang even earlier, and avoid any non-diagnostic output. --- Full diff: https://github.com/llvm/llvm

[clang] [clang][test][NFC] Use -fdriver-only over /dev/null (PR #135255)

2025-04-10 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/135255 Tests should avoid using platform dependent behavior, like /dev/null when possible. -fdriver-only should stop clang even earlier, and avoid any non-diagnostic output. >From b392334bc6be0262ca734d3791a87afeac4cab

[clang] [clang][test][NFC] Use -fdriver-only over /dev/null (PR #135255)

2025-04-10 Thread Paul Kirth via cfe-commits
ilovepi wrote: * **#135255** https://app.graphite.dev/github/pr/llvm/llvm-project/135255?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/1352

[clang] [clang][test][NFC] Use -fdriver-only over /dev/null (PR #135255)

2025-04-10 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/135255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Document invariant in Sema::AddOverloadCandidate (PR #135256)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged 1 - ArgIdx in Sema::AddOverloadCandidate for its potential to overflow. Turns out this is intentional since when PO == OverloadCandidateParamOrder::Reversed Args.size() is always tw

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Richard Smith via cfe-commits
zygoloid wrote: I see. The glibc header comment gives an idea of what's going on here: ```c /* There are two variant implementations of type-generic macros in this file: one for GCC 8 and later, using __builtin_tgmath and where each macro expands each of its arguments only once, and one

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

2025-04-10 Thread via cfe-commits
https://github.com/sstwcw closed https://github.com/llvm/llvm-project/pull/133722 ___ 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-10 Thread Amy Huang via cfe-commits
amykhuang wrote: > We have internal reports of incorrect mangling substitutions after updating > to > [537b654](https://github.com/llvm/llvm-project/commit/537b6541e8067d7ef7aa38791989fca6303b7fdf) > from > [799e905](https://github.com/llvm/llvm-project/commit/799e9053641a6478d3144866a97737b3

[clang] [llvm] [NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

2025-04-10 Thread Artem Belevich via cfe-commits
@@ -596,6 +605,28 @@ def __nvvm_e4m3x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(sh def __nvvm_e5m2x2_to_f16x2_rn : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>(short)", SM_89, PTX81>; def __nvvm_e5m2x2_to_f16x2_rn_relu : NVPTXBuiltinSMAndPTX<"_Vector<2, __fp16>

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-10 Thread Sameer Sahasrabuddhe via cfe-commits
ssahasra wrote: Thanks for the example! I think #133684 is a correct incremental step forward, but maybe just going the whole way bottom-up is better. It is also correct to remove the verifier check. It's not a well-formedness error or even a semantic error to pass a convergence control token

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-10 Thread Aaron Ballman via cfe-commits
@@ -5918,12 +5918,19 @@ clang_EvalResult_getAsUnsigned(CXEvalResult E); CINDEX_LINKAGE double clang_EvalResult_getAsDouble(CXEvalResult E); /** - * Returns the evaluation result as a constant string if the - * kind is other than Int or float. User must not free this pointer, -

[clang] [llvm] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants (PR #134345)

2025-04-10 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 updated https://github.com/llvm/llvm-project/pull/134345 >From fdaf84496ae8f6b5213be8d568010b7f3c1d1aee Mon Sep 17 00:00:00 2001 From: Srinivasa Ravi Date: Wed, 5 Mar 2025 12:35:39 +0530 Subject: [PATCH] [NVPTX] Add intrinsics for cvt .f6x2 and .ue8m0x2 variants Th

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

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

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-10 Thread Farzon Lotfi via cfe-commits
@@ -35,6 +35,12 @@ length_vec_impl(vector X) { #endif } +template +constexpr vector dst_impl(vector Src0, vector Src1) { + vector Dest = {1, Src0[1] * Src1[1], Src0[2], Src1[3]}; + return Dest; farzonl wrote: ```suggestion return {1, Src0[1] * Src1[1],

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

2025-04-10 Thread Jan Górski via cfe-commits
janagor wrote: > I don't really understand what the new version of the patch is doing... > instcombine can infer `nuw` on `trunc` if the operand has range metadata. > There isn't any reason to duplicate that code. The unoptimized version of IR is which is generated is the following: ``` %at

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Richard Smith via cfe-commits
zygoloid wrote: > > I wonder if we can put it into an AIX-only (plus whatever other targets > > still need it) include directory, though, so we only find and use it on the > > targets where it's necessary? > > That, or, generally `#include_next` except for certain platforms (like AIX)? Possib

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-10 Thread Richard Smith via cfe-commits
zygoloid wrote: > > I thought CWG's preferred direction on this was to reject entirely? > > What do they wish to reject? Defining an enum in a different declaration > context than its primary context? That seems odd. > > Do you have an idea of the CWG DR? We looked but couldn't find anything t

[clang] [C99] Remove the tgmath.h header (PR #135236)

2025-04-10 Thread Sean Perry via cfe-commits
perry-ca wrote: > > Today, that's no longer the case. > > IBM's AIX ships a `tgmath.h` that only works with the IBM non-Clang-based XL > compiler. Same for z/OS. https://github.com/llvm/llvm-project/pull/135236 ___ cfe-commits mailing list cfe-com

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-04-10 Thread Zahira Ammarguellat via cfe-commits
=?utf-8?q?Mészáros?= Gergely ,Gergely Meszaros ,Gergely Meszaros Message-ID: In-Reply-To: @@ -10685,6 +10724,7 @@ QualType Sema::CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, if (compType.isNull() || !compType->isArithmeticType()) return InvalidOperand

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

2025-04-10 Thread Farzon Lotfi via cfe-commits
@@ -280,6 +280,17 @@ 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] clang/AMDGPU: Stop looking for oclc_daz_opt_* control libraries (PR #134805)

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

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

2025-04-10 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 closed 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] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-10 Thread Nico Weber via cfe-commits
nico wrote: Looks like this breaks tests on macOS: http://45.33.8.238/macm1/104220/step_6.txt Please take a look and revert for now if it takes a while to fix. https://github.com/llvm/llvm-project/pull/133472 ___ cfe-commits mailing list cfe-commits@

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

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

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-10 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] [llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

2025-04-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Thanks for improving code health! :-) > > LGTM but I'm not familiar with this area of LLVM nor a code owner, so I'll > defer to the code owners. > > Nit: this patch does a few drive-by fixes (deletes the createAsmStreamer > variant with three bools; rename to createSystemZAsm

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Nathan Gauër (Keenuts) Changes When a callee is marked as `convergent`, some targets like HLSL/SPIR-V add a convergent token to the call. This is valid if both functions are marked as `convergent`. ADCE/BDCE and other DCE passes were al

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-04-10 Thread Mateusz Mikuła via cfe-commits
@@ -847,7 +847,11 @@ void llvm::sys::PrintStackTrace(raw_ostream &OS, int Depth) { const char *name = strrchr(dlinfo.dli_fname, '/'); if (!name) +#ifdef __CYGWIN__ + OS << format(" %-*s", width, &dlinfo.dli_fname); mati865 wrote: Right, I doubte

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/135013 We were passing the address of a local variable to a call to Diag() which then tried to use the object after its lifetime ended, resulting in crashes. We no longer pass the temporary object any longer. Fi

[clang] [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (PR #130952)

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

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-04-10 Thread Wenju He via cfe-commits
wenju-he wrote: > On my build this increases the number of targets `ninja -t targets` from 19K > to 28K. That's building all targets. I'm not sure what else we could do about > that and whether it's a problem. yes, the number of targets increase significantly with this approach. But as far as

[clang] [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (PR #130952)

2025-04-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/130952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (PR #130952)

2025-04-10 Thread Eli Friedman via cfe-commits
@@ -660,8 +660,8 @@ EmitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *M) { case SubobjectAdjustment::MemberPointerAdjustment: { llvm::Value *Ptr = EmitScalarExpr(Adjustment.Ptr.RHS); - Object = EmitCXXMemberDataPointerAddress(E, Object, Ptr, -

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

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

[clang] [Reland][Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #135135)

2025-04-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Looking at the issue description from #130990, the problem is that the code is passing `argmem: read`, but then passes a "pointer" as an i32. Which is against the rules: argmem is specifically pointer arguments. So either needs to just be marked "read", or you need to f

[clang] 2f29829 - [Clang][P1061] Fix invalid pack binding crash (#135129)

2025-04-10 Thread via cfe-commits
Author: Jason Rice Date: 2025-04-11T08:12:11+08:00 New Revision: 2f298294759307e532dcce50549534cbe8ba6561 URL: https://github.com/llvm/llvm-project/commit/2f298294759307e532dcce50549534cbe8ba6561 DIFF: https://github.com/llvm/llvm-project/commit/2f298294759307e532dcce50549534cbe8ba6561.diff LO

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--fmodule-output` (PR #121046)

2025-04-10 Thread Sharadh Rajaraman via cfe-commits
@@ -14,3 +14,11 @@ //--- test.pcm // CPP20WARNING-NOT: clang-cl: warning: argument unused during compilation: '/std:c++20' [-Wunused-command-line-argument] + +// test whether the following outputs %Hello.bmi +// RUN: %clang_cl /std:c++20 --precompile -x c++-module -fmodule-o

[clang] Reject invalid integer constants in unevaluated preprocessor operands (PR #134884)

2025-04-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/134884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-10 Thread Alexey Bataev via cfe-commits
@@ -4899,6 +4899,150 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [CUDA][Windows] detect installation via CUDA_PATH environment variable (PR #135299)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (SquallATF) Changes On Windows platforms, this patch enables detection of the CUDA installation directory by checking the CUDA_PATH environment variable. --- Full diff: https://github.com/llvm/llvm-project/pull/135299.diff 1

[clang] 04c3898 - [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (#130952)

2025-04-10 Thread via cfe-commits
Author: Yingwei Zheng Date: 2025-04-11T10:51:08+08:00 New Revision: 04c38981a9ce3e6225669c0e41cab947e3e7989f URL: https://github.com/llvm/llvm-project/commit/04c38981a9ce3e6225669c0e41cab947e3e7989f DIFF: https://github.com/llvm/llvm-project/commit/04c38981a9ce3e6225669c0e41cab947e3e7989f.diff

[clang] [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (PR #130952)

2025-04-10 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/130952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (PR #130952)

2025-04-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 5 "compile-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/3246 Here is the relevant

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-10 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/135110 >From 1615cb987f60d8c6123f7c95bc7bd7f22d897ea1 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Wed, 9 Apr 2025 09:44:47 +0800 Subject: [PATCH 1/4] [RISCV] Add Andes XAndesperf (Andes Performance) extension. The

[clang] [nvptx-arch] allowed load `nvcuda.dll` on Windows (PR #135300)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SquallATF) Changes Make nvptx-arch work on windows --- Full diff: https://github.com/llvm/llvm-project/pull/135300.diff 1 Files Affected: - (modified) clang/tools/offload-arch/NVPTXArch.cpp (+4) ``diff diff --git a/clan

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-10 Thread Jim Lin via cfe-commits
@@ -0,0 +1,358 @@ +//===-- RISCVInstrInfoXAndes.td *- tablegen -*-===// +// +// 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] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-10 Thread Jim Lin via cfe-commits
@@ -535,21 +540,29 @@ RISCVMCCodeEmitter::getImmOpValueSlist(const MCInst &MI, unsigned OpNo, } } -uint64_t -RISCVMCCodeEmitter::getImmOpValueAsr1(const MCInst &MI, unsigned OpNo, +template +unsigned +RISCVMCCodeEmitter::getImmOpValueAsrN(const MCInst &MI, unsigned OpNo,

[clang] [flang] [Flang][OpenMP][ROCM] Enable rocm-device-lib-path for flang (PR #135307)

2025-04-10 Thread via cfe-commits
https://github.com/agozillon created https://github.com/llvm/llvm-project/pull/135307 Currently rocm-device-lib-path is not enabled for Flang, so when the compiler warns / requests a user to provide this option in cases where it can't find rocm a user cannot actually set the device libraries u

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-10 Thread Jim Lin via cfe-commits
@@ -940,6 +947,14 @@ struct RISCVOperand final : public MCParsedAsmOperand { [](int64_t Imm) { return Imm != INT64_MIN && isInt<5>(Imm - 1); }); } + bool isSImm18() const { return isBareSimmNLsbK<18, 0>(); } + + bool isSImm18Lsb0() const { return isBareSimmNLsb0<18

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-04-10 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: Here's a new reproducer, this time verifying that a semi-fresh tip-of-the-tree doesn't trigger the same error: https://pastebin.com/7tYfjazz. Apologies for the delay. https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commit

[clang] [flang] [Flang][OpenMP][ROCM] Enable rocm-device-lib-path for flang (PR #135307)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: None (agozillon) Changes Currently rocm-device-lib-path is not enabled for Flang, so when the compiler warns / requests a user to provide this option in cases where it can't find rocm a user cannot actually set the device libraries

[clang] [flang] [Flang][OpenMP][ROCM] Enable rocm-device-lib-path for flang (PR #135307)

2025-04-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (agozillon) Changes Currently rocm-device-lib-path is not enabled for Flang, so when the compiler warns / requests a user to provide this option in cases where it can't find rocm a user cannot actually set the device libraries using

[clang] [flang] [Flang][OpenMP][ROCM] Enable rocm-device-lib-path for flang (PR #135307)

2025-04-10 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/135307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-10 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: ping. https://github.com/llvm/llvm-project/pull/133710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

2025-04-10 Thread Srinivasa Ravi via cfe-commits
Wolfram70 wrote: Added `-disable-llvm-optzns` to the new RUN lines in `builtins-nvptx.c` since I think some tests are failing due to changes from #134416 https://github.com/llvm/llvm-project/pull/134345 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang-tools-extra] [clang][HeuristicResolver] Apply default argument heuristic in resolveDeclRefExpr as well (PR #132576)

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/132576 >From ac3780d5f747c8c063119a028a4735c725198003 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 22 Mar 2025 20:54:02 -0400 Subject: [PATCH] [clang][HeuristicResolver] Apply default argument heuristi

[clang] [clang-tools-extra] [clang][HeuristicResolver] Apply default argument heuristic in resolveDeclRefExpr as well (PR #132576)

2025-04-10 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Rebased) https://github.com/llvm/llvm-project/pull/132576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/134951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-10 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > Does this have any effect on the build time of the compiler? This file is > already large and I assume this significantly increases the size. Yes, the .inc size is 6 times larger. I don't know how to assess the impact, theoretically the time to read file and tokenize will in

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-04-10 Thread Nathan Ridge via cfe-commits
@@ -54,8 +54,9 @@ IdentifierInfo *Parser::getSEHExceptKeyword() { } Parser::Parser(Preprocessor &pp, Sema &actions, bool skipFunctionBodies) -: PP(pp), PreferredType(pp.isCodeCompletionEnabled()), Actions(actions), - Diags(PP.getDiagnostics()), StackHandler(Diags), +

[clang] [clang] ItaniumMangle: fix mangling for unresolved types (PR #135312)

2025-04-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/135312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-10 Thread via cfe-commits
https://github.com/Lai-YT closed https://github.com/llvm/llvm-project/pull/134244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-04-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130473 >From f6c57947b12d8c22e8e54757fc03ff1e407aa12e Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 9 Mar 2025 01:36:25 -0500 Subject: [PATCH 1/6] Change the parameter type of resolveTypeToTagDecl() to

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-04-10 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Rebased) https://github.com/llvm/llvm-project/pull/130473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   >