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

2025-04-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl 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-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: David Rivera (RiverDave) Changes Covered the edge case where an int expression is not necessarily directly wrapped around an ImplicitCastExpr which seemed to be a requirement in this check to trigger. **For instance**: ```cp

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave created https://github.com/llvm/llvm-project/pull/134188 Covered the edge case where an int expression is not necessarily directly wrapped around an ImplicitCastExpr which seemed to be a requirement in this check to trigger. **For instance**: ```cpp #include bo

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

2025-04-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds ClangIR support for break and continue statements in loops. Because only loops are currently implemented upstream in CIR, only breaks in loops are supported here, but this same code will work (wi

[clang] [Clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/133878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Use llvm::erase_if (NFC) (PR #134017)

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

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

2025-04-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/133850 >From cd2f6658a1a609edf7471f629b766eb4ee495122 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Sun, 30 Mar 2025 00:59:48 -0400 Subject: [PATCH 1/3] [Clang][Cmake] fix libtool duplicate member name warnings fi

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/133863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b384d6d - [CodeGen] Don't include CGDebugInfo.h in CodeGenFunction.h (NFC) (#134100)

2025-04-02 Thread via cfe-commits
Author: Nikita Popov Date: 2025-04-03T08:04:19+02:00 New Revision: b384d6d6ccc8f4452cd7086061c657ce76b41224 URL: https://github.com/llvm/llvm-project/commit/b384d6d6ccc8f4452cd7086061c657ce76b41224 DIFF: https://github.com/llvm/llvm-project/commit/b384d6d6ccc8f4452cd7086061c657ce76b41224.diff

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

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -45,6 +45,14 @@ distance_vec_impl(vector X, vector Y) { return length_vec_impl(X - Y); } +constexpr float dot2add_impl(half2 a, half2 b, float c) { +#if defined(__DIRECTX__) farzonl wrote: Also to answer your question we only need to do one or the other

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] c57b9c2 - [CIR] Generate the nsw flag correctly for unary ops (#133815)

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

[clang] [clang-tools-extra] [clang] support pack expansions for trailing requires clauses (PR #133190)

2025-04-02 Thread via cfe-commits
@@ -7379,8 +7378,11 @@ bool ASTContext::isSameEntity(const NamedDecl *X, const NamedDecl *Y) const { return false; } -if (!isSameConstraintExpr(FuncX->getTrailingRequiresClause(), cor3ntin wrote: Can we add an overload, at least + comment? htt

[clang] [clang][NFC] Refactor CodeGen's hasBooleanRepresentation (PR #134159)

2025-04-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/134159 The ClangIR upstreaming project needs the same logic for hasBooleanRepresentation() that is currently implemented in the standard clang codegen. In order to share this code, this change moves the implementat

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 1/7] Implement a dst function with test cases for HLSL

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

[clang] [clang] Fix crash on invalid `std::initializer_list` template-id (PR #132284)

2025-04-02 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132284 >From 553ced1e367c0ec6399e71e7a3a3685a550f3431 Mon Sep 17 00:00:00 2001 From: offsetof Date: Thu, 20 Mar 2025 20:54:45 + Subject: [PATCH 1/2] [clang] Fix crash on invalid `std::initializer_list` template-i

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

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

[clang] [clang] remove unused frontend flag -fretain_subst_template_type_parm_type_ast_nodes (PR #134177)

2025-04-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/134177 This is a follow-up to #132748, where we deferred the flag removal in order to ease transition for external users. The plan is to merge this in the nearish future, in two weeks or so is my best guess. >From

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/2751 Here is the relevant piece

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

2025-04-02 Thread Aniket Lal via cfe-commits
lalaniket8 wrote: pinging for review @arsenm @yxsamliu @rjmccall 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] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-02 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl 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] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

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

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

2025-04-02 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-02T19:27:29-03:00 New Revision: f302f35526553abcb46dab278c4494c3d01deb45 URL: https://github.com/llvm/llvm-project/commit/f302f35526553abcb46dab278c4494c3d01deb45 DIFF: https://github.com/llvm/llvm-project/commit/f302f35526553abcb46dab278c4494c3d01deb45.dif

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

2025-04-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)

2025-04-02 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/134174 Update Sema Checking to always do an HLSL Array RValue cast in the case we are dealing with hlsl constant array types Instead of comparing canonical types, compare canonical unqualified types Add a test to show it

[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)

2025-04-02 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 cpp -- clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaOve

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From ac9833cd5abdaf4a91c785d5fa9d51190219851a Mon Sep 17 00:00:00 2001 From: David Rivera Date: Wed, 2 Apr 2025 21:02:00 -0400 Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid expre

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick dcc2182bce https://github.com/llvm/llvm-project/pull/133863 ___ 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-02 Thread Farzon Lotfi 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] dcc2182 - [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (#133863)

2025-04-02 Thread via cfe-commits
Author: Younan Zhang Date: 2025-04-03T11:15:42+08:00 New Revision: dcc2182bce3d2ef0e0a991664c51b4b3bfcf7197 URL: https://github.com/llvm/llvm-project/commit/dcc2182bce3d2ef0e0a991664c51b4b3bfcf7197 DIFF: https://github.com/llvm/llvm-project/commit/dcc2182bce3d2ef0e0a991664c51b4b3bfcf7197.diff

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-04-02 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 %s -verify=expected,type-param -std=c++23 -DTYPE_PARAM +// RUN: %clang_cc1 %s -verify=expected,others -std=c++23 -DCONSTANT_PARAM +// RUN: %clang_cc1 %s -verify=expected,others -std=c++23 -DTYPE_TEMPLATE_PARAM +// RUN: %clang_cc1 %s -verify=exp

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

2025-04-02 Thread Younan Zhang via cfe-commits
zyn0217 wrote: /cherry-pick dcc2182bc https://github.com/llvm/llvm-project/pull/133863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Check `std::initializer_list` more strictly (PR #133822)

2025-04-02 Thread Younan Zhang via cfe-commits
@@ -12155,16 +12185,16 @@ static ClassTemplateDecl *LookupStdInitializerList(Sema &S, SourceLocation Loc){ Result.suppressDiagnostics(); // We found something weird. Complain about the first thing we found. NamedDecl *Found = *Result.begin(); -S.Diag(Found->get

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-04-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes This reapplies 5ffd9bdb50b57 (#133545) with fixes. The BUILD_SHARED_LIBS=ON build was fixed by adding missing LLVM dependencies to the InterpTests binary in unittests/AST/ByteCo

[clang] [clang-format] Fix a bug in annotating braces (PR #134039)

2025-04-02 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/7879 Here is the releva

[clang] [Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (PR #133863)

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

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

2025-04-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/134195 This reapplies 5ffd9bdb50b57 (#133545) with fixes. The BUILD_SHARED_LIBS=ON build was fixed by adding missing LLVM dependencies to the InterpTests binary in unittests/AST/ByteCode/CMakeLists.txt . >From fe6604dc283

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Matt Arsenault via cfe-commits
@@ -138,6 +139,9 @@ class EquivalenceClasses { /// ECValues, it just keeps the key as part of the value. std::set TheMapping; + /// List of all members, used to provide a determinstic iteration order. + SmallVector Members; arsenm wrote: Can you combine

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

2025-04-02 Thread Joseph Huber via cfe-commits
@@ -585,6 +597,23 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_processor_is: { +assert(CGM.getTriple().isSPIRV() &&

[clang] [HIP] Claim `--offload-compress` for `-M` (PR #133456)

2025-04-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/133456 >From be4ea80f2431bff0c017df3aef9f260dddfa9ccc Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Fri, 28 Mar 2025 11:30:39 -0400 Subject: [PATCH] [HIP] Claim --offloading-compress for -M Cmake automatical

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133967 >From 0ab40315cd5ca320d84f87c99b8f23d9b6e8ed36 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 14:31:24 -0700 Subject: [PATCH 1/5] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V b

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

2025-04-02 Thread Erich Keane via cfe-commits
erichkeane wrote: > This change adds two semi-magical builtins for AMDGPU: > > * `__builtin_amdgcn_processor_is`, which is similar in observable > behaviour with `__builtin_cpu_is`, except that it is never "evaluated" at run > time; > > * `__builtin_amdgcn_is_invocable`, which is beha

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

2025-04-02 Thread via cfe-commits
Author: Maxim Zhukov Date: 2025-04-02T16:05:44+03:00 New Revision: 2b7daaf9678181959982b219db0af106f4ef8e3e URL: https://github.com/llvm/llvm-project/commit/2b7daaf9678181959982b219db0af106f4ef8e3e DIFF: https://github.com/llvm/llvm-project/commit/2b7daaf9678181959982b219db0af106f4ef8e3e.diff

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

2025-04-02 Thread via cfe-commits
github-actions[bot] wrote: @Mephistophiles Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

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

2025-04-02 Thread Yaxun Liu 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] [flang] [flang][OpenMP] Extend `do concurrent` mapping to multi-range loops (PR #127634)

2025-04-02 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/127634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-02 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/130623 >From 8b2ad7c1475ff4aee065e9feb21469d184320472 Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:51:34 + Subject: [PATCH 1/8] [NFC][ARM] Split SIMD identifier away from MVE Previously, t

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. This looks reasonable to me. We could keep the existing API with a custom iterator, but given the limited amount of uses this seems ok. https://github.com/llvm/llvm-project/pull/134075 ___ cfe-commi

[libclc] [libclc] Move cbrt to the CLC library; vectorize (PR #133940)

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

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Florian Hahn via cfe-commits
@@ -138,6 +139,9 @@ class EquivalenceClasses { /// ECValues, it just keeps the key as part of the value. std::set TheMapping; + /// List of all members, used to provide a determinstic iteration order. + SmallVector Members; fhahn wrote: This is where th

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
mjklemm wrote: > Should the `nowait(EXPR)` behavior be guarded by the OpenMP version flag? It > seems to me that the tests would currently not respect which OpenMP version > is selected and always generate the error. I agree. This should be under `-fopenmp-version=6.0` https://github.com/llv

[clang] [llvm] [EquivalenceClasses] Use SmallVector for deterministic iteration order. (PR #134075)

2025-04-02 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/134075 >From 10afe2fb4743c0fccaad2797fffca174736a0997 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sat, 29 Mar 2025 20:20:39 + Subject: [PATCH 1/2] [EquivalenceClasses] Use SmallVector for deterministic iterati

[libclc] [libclc]: clspv: add a dummy implememtation for mul_hi (PR #134094)

2025-04-02 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: For the record, clspv implementation is based on OpMulExtended which is SPIR-V specific and not accessible from C. https://github.com/llvm/llvm-project/pull/134094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang] Allow parentheses around CTAD declarators (PR #132829)

2025-04-02 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132829 >From 66833f41d26a6c6355ef67b2f9041ba771b690b7 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 20:51:23 + Subject: [PATCH 1/3] [clang] Allow parentheses around CTAD declarators --- clang/do

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

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

2025-04-02 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > LGTM. > > It would be safer/clearer to make the `IsFortran` argument change a separate > PR... Good point. I could have made another PR to set `flang-rt` library name only. Will keep that in mind. https://github.com/llvm/llvm-project/pull/131041 _

[clang] [HLSL] Implement `SpirvType` and `SpirvOpaqueType` (PR #134034)

2025-04-02 Thread Cassandra Beckley via cfe-commits
https://github.com/cassiebeckley updated https://github.com/llvm/llvm-project/pull/134034 >From 78ac1bc4225b41bc4b9fbd9fd9ab9dc82a2953ca Mon Sep 17 00:00:00 2001 From: Cassandra Beckley Date: Tue, 1 Apr 2025 23:12:02 -0700 Subject: [PATCH 1/3] [HLSL] Implement `SpirvType` and `SpirvOpaqueType`

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -7,13 +7,14 @@ void foo() { int main(int argc, char **argv) { int i; - #pragma omp target simd nowait( // expected-warning {{extra tokens at the end of '#pragma omp target simd' are ignored}} + #pragma omp target simd nowait( // expected-error {{expected expression}}

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -13329,6 +13359,9 @@ inline QualType Sema::CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, // The following is safe because we only use this method for // non-overloadable operands. + if (IsAMDGPUPredicateBI(LHS.get()) && IsAMDGPUPredicateBI(RHS.get())) ---

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -7,13 +7,13 @@ void foo() { int main(int argc, char **argv) { int i; -#pragma omp target teams distribute parallel for nowait( // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams dis

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -6,13 +6,11 @@ void foo() { } int main(int argc, char **argv) { -#pragma omp target teams nowait( // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}} - foo(); -#pragma omp target teams nowait (argc)) // expected-warning {{extra tokens

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -6,13 +6,13 @@ void foo() { } int main(int argc, char **argv) { - #pragma omp target parallel nowait( // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} - foo(); + #pragma omp target parallel nowait( // expected-error {{expecte

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-04-02 Thread Michael Klemm via cfe-commits
@@ -7,13 +7,13 @@ void foo() { int main(int argc, char **argv) { int i; - #pragma omp target parallel for nowait( // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} + #pragma omp target parallel for nowait( // expected-error

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -6541,6 +6541,22 @@ ExprResult Sema::BuildCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc, if (Result.isInvalid()) return ExprError(); Fn = Result.get(); + // The __builtin_amdgcn_is_invocable builtin is special, and will be resolved erichke

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/133967 >From 0ab40315cd5ca320d84f87c99b8f23d9b6e8ed36 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 31 Mar 2025 14:31:24 -0700 Subject: [PATCH 1/6] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V b

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -15576,6 +15609,38 @@ static bool isOverflowingIntegerType(ASTContext &Ctx, QualType T) { return Ctx.getIntWidth(T) >= Ctx.getIntWidth(Ctx.IntTy); } +static Expr *ExpandAMDGPUPredicateBI(ASTContext &Ctx, CallExpr *CE) { + if (!CE->getBuiltinCallee()) +return CXXBool

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -15576,6 +15609,38 @@ static bool isOverflowingIntegerType(ASTContext &Ctx, QualType T) { return Ctx.getIntWidth(T) >= Ctx.getIntWidth(Ctx.IntTy); } +static Expr *ExpandAMDGPUPredicateBI(ASTContext &Ctx, CallExpr *CE) { + if (!CE->getBuiltinCallee()) +return CXXBool

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4920,6 +4920,116 @@ If no address spaces names are provided, all address spaces are fenced. __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local") __builtin_amdgcn_fence(__ATOMIC_SEQ_CST, "workgroup", "local", "global") +__builtin_amdgcn_processor_is and __bui

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

2025-04-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. The user interface design of these builtins is just completely unacceptable, and it has made the sema implementation more difficult than it needs to be. Best I can tell, the answer for even things like `decltype` changes wh

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

2025-04-02 Thread Erich Keane via cfe-commits
@@ -585,6 +597,23 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_processor_is: { +assert(CGM.getTriple().isSPIRV() &&

[clang] Remove duplicate API (PR #132776)

2025-04-02 Thread via cfe-commits
Jugst3r wrote: Sure, I did what @Endilll suggested. It is kind of unfortunate to have such similar type names :/. I don't think I can use the [[attribute]] C++-style syntax, maybe there is another syntax I am not aware of, but for the mean time I put the deprecated inside the comments. https:

[clang] [clang-tools-extra] [clang] support pack expansions for trailing requires clauses (PR #133190)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -78,6 +78,22 @@ class UnresolvedSetImpl; class VarTemplateDecl; enum class ImplicitParamKind; +// Holds a constraint expression along with a pack expansion index, if +// expanded. +struct AssociatedConstraint { + const Expr *ConstraintExpr = nullptr; + int ArgumentPackSub

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-04-02 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/133775 >From aeca7c2c7bf4cc7aef87374f3890f2a42e61d07d Mon Sep 17 00:00:00 2001 From: David Truby Date: Mon, 31 Mar 2025 19:39:37 +0100 Subject: [PATCH 1/2] [flang] Complete alignment of -x language modes with gfort

[clang] [Clang] Fix dependent local class instantiation bugs (PR #134038)

2025-04-02 Thread Erich Keane via cfe-commits
@@ -4264,7 +4264,8 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation, if (FunctionDecl *Pattern = Function->getInstantiatedFromMemberFunction()) { -if (Function->isIneligibleOrNotSelected()) +if (!Instantiation->getDeclCo

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

2025-04-02 Thread Shilei Tian via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?=

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

2025-04-02 Thread Alex Voicu via cfe-commits
@@ -284,6 +284,18 @@ void CodeGenFunction::AddAMDGPUFenceAddressSpaceMMRA(llvm::Instruction *Inst, Inst->setMetadata(LLVMContext::MD_mmra, MMRAMetadata::getMD(Ctx, MMRAs)); } +static Value *GetOrInsertAMDGPUPredicate(CodeGenFunction &CGF, Twine Name) { + auto PTy = Integer

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

2025-04-02 Thread Alex Voicu via cfe-commits
@@ -15576,6 +15609,38 @@ static bool isOverflowingIntegerType(ASTContext &Ctx, QualType T) { return Ctx.getIntWidth(T) >= Ctx.getIntWidth(Ctx.IntTy); } +static Expr *ExpandAMDGPUPredicateBI(ASTContext &Ctx, CallExpr *CE) { + if (!CE->getBuiltinCallee()) +return CXXBool

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

2025-04-02 Thread via cfe-commits
https://github.com/YLChenZ created https://github.com/llvm/llvm-project/pull/134089 Closes #133706. before the patch: ![docb4](https://github.com/user-attachments/assets/6db1000f-d555-48b8-8a19-85c41b043fd8) after the patch: ![doc-after](https://github.com/user-attachments/assets/1cff64b6-d

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

2025-04-02 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/134016 >From 91eeaf02336e539f14dcb0a79ff15dbe8befe6f1 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Wed, 2 Apr 2025 02:47:42 +0100 Subject: [PATCH 1/8] Add the functional identity and feature queries. --- clang/doc

[libclc] [libclc] Move sinh, cosh & tanh to the CLC library (PR #134063)

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

[libclc] d51525b - [libclc] Move lgamma, lgamma_r & tgamma to CLC library (#134053)

2025-04-02 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-04-02T15:20:32+01:00 New Revision: d51525ba36017507fe95ce48e9670b6f4b267016 URL: https://github.com/llvm/llvm-project/commit/d51525ba36017507fe95ce48e9670b6f4b267016 DIFF: https://github.com/llvm/llvm-project/commit/d51525ba36017507fe95ce48e9670b6f4b267016.diff

[clang] [Clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-04-02 Thread via cfe-commits
https://github.com/GeorgeKA updated https://github.com/llvm/llvm-project/pull/133806 >From dd978982b2ab41d3d2a55abb448e653a80158ecd Mon Sep 17 00:00:00 2001 From: George Asante Date: Mon, 31 Mar 2025 17:41:20 -0400 Subject: [PATCH 1/3] Add warning message for C++17 alias template CTAD --- cla

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

2025-04-02 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/134016 >From 91eeaf02336e539f14dcb0a79ff15dbe8befe6f1 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Wed, 2 Apr 2025 02:47:42 +0100 Subject: [PATCH 1/9] Add the functional identity and feature queries. --- clang/doc

[clang] [clang] Add SPIR-V to some OpenMP clang tests (PR #133503)

2025-04-02 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Alright, LG. Unrelated, but it would be nice if someone who knows SPIR-V better could look at adding similar builtins for the ones we need to get it working through OpenMP. I've landed some merges that should make that work, but it seems t

[clang] [clang][modules] Determine if the SDK supports builtin modules independent of the target (PR #134005)

2025-04-02 Thread Volodymyr Sapsai via cfe-commits
@@ -62,6 +63,28 @@ DarwinSDKInfo::RelatedTargetVersionMapping::parseJSON( Min, Max, MinValue, MaximumDeploymentTarget, std::move(Mapping)); } +static llvm::Triple::OSType parseOS(const llvm::json::Object &Obj) { + // The CanonicalName is the Xcode platform, a version, a

[clang] [clang][modules] Determine if the SDK supports builtin modules independent of the target (PR #134005)

2025-04-02 Thread Volodymyr Sapsai via cfe-commits
@@ -2990,26 +2996,18 @@ static bool sdkSupportsBuiltinModules( return false; VersionTuple SDKVersion = SDKInfo->getVersion(); - switch (TargetPlatform) { + switch (SDKInfo->getOS()) { // Existing SDKs added support for builtin modules in the fall // 2024 major re

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 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 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/2698 Here is the re

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-02 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/133878 >From 289f8630dccf916b8cf7cc43758bae60df036c5d Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Wed, 2 Apr 2025 00:53:33 -0700 Subject: [PATCH 1/4] clang frontend crash with friend class declaration and overl

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/20355 Here is

[clang] [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker (PR #133967)

2025-04-02 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: @sarnex, @jhuber6 Thanks much for your kind feedbacks. This is ready to be merged. Can one of you please help? Sincerely https://github.com/llvm/llvm-project/pull/133967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

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

2025-04-02 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/134016 >From 91eeaf02336e539f14dcb0a79ff15dbe8befe6f1 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Wed, 2 Apr 2025 02:47:42 +0100 Subject: [PATCH 01/10] Add the functional identity and feature queries. --- clang/d

[clang] Hlsl dst function (PR #133828)

2025-04-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float4 test_too_many_arg(float4 p0) +{ +dst(p0, p0, p0); + // expected-error@-1 {{no matching function

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

2025-04-02 Thread Eli Friedman via cfe-commits
Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= Message-ID: In-Reply-To: @@ -590,6 +590,29 @@ static void EmitAtomicOp(CodeGenFunction &CGF, AtomicExpr *E, Address Dest, llvm::LoadInst *Load = CGF.Builder.CreateLoad(Ptr); Load->setAtomic(Order, Scope); Load->set

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

2025-04-02 Thread Eli Friedman via cfe-commits
Jan =?utf-8?q?Górski?= , Jan =?utf-8?q?Górski?= Message-ID: In-Reply-To: @@ -590,6 +590,29 @@ static void EmitAtomicOp(CodeGenFunction &CGF, AtomicExpr *E, Address Dest, llvm::LoadInst *Load = CGF.Builder.CreateLoad(Ptr); Load->setAtomic(Order, Scope); Load->set

  1   2   3   4   >