[clang] [clang][analyzer] Check initialization and argument passing in FixedAddressChecker (PR #110977)

2024-10-04 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/110977 From 36d99fc59b675737ce952087b7a71ec6e4b579a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 30 Sep 2024 16:51:35 +0200 Subject: [PATCH 1/3] [clang][analyzer] Check initialization

[clang] [llvm] [ARM][AArch64] Introduce the Armv9.6-A architecture version (PR #110825)

2024-10-04 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9e831d5 - [AArch64] Pass -mabi option through to multilib (#110874)

2024-10-04 Thread via cfe-commits
Author: Oliver Stannard Date: 2024-10-04T09:38:11+01:00 New Revision: 9e831d50a0d67c6779048742657edb437818b681 URL: https://github.com/llvm/llvm-project/commit/9e831d50a0d67c6779048742657edb437818b681 DIFF: https://github.com/llvm/llvm-project/commit/9e831d50a0d67c6779048742657edb437818b681.dif

[clang] [AArch64] Pass -mabi option through to multilib (PR #110874)

2024-10-04 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/110874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Infer nusw + nneg -> nuw for getelementptr (PR #111144)

2024-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Nikita Popov (nikic) Changes If the gep is nusw (usually via inbounds) and the offset is non-negative, we can infer nuw. Unfortunately this inference does have some compile-time overhead: https://llvm-compile-time-tracker.com/c

[clang] [llvm] [InstCombine] Infer nusw + nneg -> nuw for getelementptr (PR #111144)

2024-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-pgo Author: Nikita Popov (nikic) Changes If the gep is nusw (usually via inbounds) and the offset is non-negative, we can infer nuw. Unfortunately this inference does have some compile-time overhead: https://llvm-compile-time-tracker.com/compare.php?f

[clang] [llvm] [InstCombine] Infer nusw + nneg -> nuw for getelementptr (PR #111144)

2024-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-systemz @llvm/pr-subscribers-backend-powerpc Author: Nikita Popov (nikic) Changes If the gep is nusw (usually via inbounds) and the offset is non-negative, we can infer nuw. Unfortunately this inference does have some compile-time overhead: ht

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

2024-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Closes https://github.com/llvm/llvm-project/issues/98592 --- Full diff: https://github.com/llvm/llvm-project/pull/43.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3) - (modified)

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

2024-10-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/43 Closes https://github.com/llvm/llvm-project/issues/98592 >From 567177e658ede96a59a22af14c9472e232391487 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 4 Oct 2024 20:22:59 +0800 Subject: [PATCH] [Clang]

[clang] [analyzer] Use dynamic type when invalidating by a member function call (PR #111138)

2024-10-04 Thread Balazs Benics via cfe-commits
steakhal wrote: @necto https://github.com/llvm/llvm-project/pull/38 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Infer nusw + nneg -> nuw for getelementptr (PR #111144)

2024-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: Nikita Popov (nikic) Changes If the gep is nusw (usually via inbounds) and the offset is non-negative, we can infer nuw. Unfortunately this inference does have some compile-time overhead: https://llvm-compile-time-tracker.com/compar

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

2024-10-04 Thread Younan Zhang via cfe-commits
@@ -478,3 +478,166 @@ A a{.f1 = {1}}; // CHECK-NEXT: `-DeclRefExpr {{.+}} 'int' NonTypeTemplateParm {{.+}} 'N' 'int' } // namespace GH83368 + +namespace GH60777 { + +template constexpr bool True() { return true; } + +template + requires(sizeof(T) == 4) +struct A { +

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

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

[clang] [clang][x86] Add constexpr support for some basic SSE1 intrinsics (PR #111001)

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

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-10-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Still LGTM. https://github.com/llvm/llvm-project/pull/109838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use the XL pragma pack semantics on z/OS (PR #111053)

2024-10-04 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree approved this pull request. LGTM, can we add [SystemZ][z/OS] in the title to make it consistent with other PRs https://github.com/llvm/llvm-project/pull/111053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -18631,6 +18631,14 @@ static Intrinsic::ID getDotProductIntrinsic(CGHLSLRuntime &RT, QualType QT) { return RT.getUDotIntrinsic(); } +Intrinsic::ID getFirstBitHighIntrinsic(CGHLSLRuntime &RT, QualType QT) { + if (QT->hasSignedIntegerRepresentation()) { +return RT.get

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-10-04 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Yeah so the problem is if you do `__builtin_dynamic_object_size(v, 0)` > > In that case it's a `DeclRefExpr`, a pointer, and an `LValue`. Can you give a more complete example? I just tried the following, and I see an lvaluetorvalue cast. int f(const void *p) { return _

[clang] [flang] [llvm] [openmp] [Clang][OpenMP] Add permutation clause (PR #92030)

2024-10-04 Thread Alexey Bataev via cfe-commits
@@ -16029,6 +16074,44 @@ OMPClause *SemaOpenMP::ActOnOpenMPSizesClause(ArrayRef SizeExprs, SanitizedSizeExprs); } +OMPClause *SemaOpenMP::ActOnOpenMPPermutationClause(ArrayRef PermExprs, +Sour

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585)" (PR #111173)

2024-10-04 Thread Matheus Izvekov via cfe-commits
@@ -4159,7 +4159,7 @@ FunctionTemplateDecl *FunctionDecl::getPrimaryTemplate() const { if (FunctionTemplateSpecializationInfo *Info = TemplateOrSpecialization .dyn_cast()) { -return Info->getTemplate(); +return Info->getTemplate()->getMostRecentDe

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -928,6 +928,78 @@ float3 exp2(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2) float4 exp2(float4); +//===--===// +// firstbithigh builtins +//===

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/111010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-04 Thread Brad Richardson via cfe-commits
https://github.com/everythingfunctional updated https://github.com/llvm/llvm-project/pull/110023 >From 649a73478c78389560042030a9717a05e8e338a8 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Wed, 25 Sep 2024 13:25:22 -0500 Subject: [PATCH 1/7] [flang][driver] rename flang-new to flang --

[clang] dada3c3 - [libclang] Avoid repeated hash lookups (NFC) (#111087)

2024-10-04 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-04T07:38:14-07:00 New Revision: dada3c316d69ab641c9972062745ac16af34533e URL: https://github.com/llvm/llvm-project/commit/dada3c316d69ab641c9972062745ac16af34533e DIFF: https://github.com/llvm/llvm-project/commit/dada3c316d69ab641c9972062745ac16af34533e.diff L

[clang] [libclang] Avoid repeated hash lookups (NFC) (PR #111087)

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

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585)" (PR #111173)

2024-10-04 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/73 Reapplies #106585, fixing an issue where non-dependent names of member templates appearing prior to that member template being explicitly specialized for an implicitly instantiated class template specializat

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/111027 >From 21dc8df292d85b7f48f75ea2a707be6c4971e2f9 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Thu, 3 Oct 2024 09:41:08 -0700 Subject: [PATCH 1/3] Turn Wdeprecated-literal-operator on by default It would be

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/111027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585)" (PR #111173)

2024-10-04 Thread Krystian Stasiowski via cfe-commits
@@ -4159,7 +4159,7 @@ FunctionTemplateDecl *FunctionDecl::getPrimaryTemplate() const { if (FunctionTemplateSpecializationInfo *Info = TemplateOrSpecialization .dyn_cast()) { -return Info->getTemplate(); +return Info->getTemplate()->getMostRecentDe

[clang] 296a00b - [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (#111055)

2024-10-04 Thread via cfe-commits
Author: davidtrevelyan Date: 2024-10-04T09:33:53-07:00 New Revision: 296a00bead8a25d875975ce68a5cd12c5fce6233 URL: https://github.com/llvm/llvm-project/commit/296a00bead8a25d875975ce68a5cd12c5fce6233 DIFF: https://github.com/llvm/llvm-project/commit/296a00bead8a25d875975ce68a5cd12c5fce6233.diff

[clang] [clang][rtsan] Add sanitize_realtime_unsafe attr to [[clang::blocking]] function IR (PR #111055)

2024-10-04 Thread Chris Apple via cfe-commits
https://github.com/cjappl closed https://github.com/llvm/llvm-project/pull/111055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-04 Thread Oleksandr T. via cfe-commits
@@ -36,7 +36,7 @@ using r1i2 = r1; // expected-error {{constraints not satisfied for class t template requires false_v // expected-note@-1 {{because 'false_v'}} -// expected-note@-2 {{because 'false_v' evaluated to false}} +// expected-note@-2 {{because 'false_v' evaluated to

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-10-04 Thread Neil Henning via cfe-commits
sheredom wrote: > > `-emit-pch -o "%t.pch" %t/From/../From/B.h` > > > `'could not find file > > 'D:\llvm-project\build\tools\clang\test\VFS\Output\remap-to-fake.c.tmp\From\..\From\B.h'` > > Isn't that the same issue I mentioned, that it doesn't appear to work for the > main PCH input file? If

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2024-10-04 Thread Sean Perry via cfe-commits
https://github.com/perry-ca edited https://github.com/llvm/llvm-project/pull/111035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Add z/OS customization file (PR #111182)

2024-10-04 Thread Sean Perry via cfe-commits
https://github.com/perry-ca edited https://github.com/llvm/llvm-project/pull/82 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4c26a1e - [SystemZ][z/OS] Use the XL pragma pack semantics on z/OS (#111053)

2024-10-04 Thread via cfe-commits
Author: Sean Perry Date: 2024-10-04T13:59:00-04:00 New Revision: 4c26a1e4d7e490a38dcd2a24e4c8939075fd4a5a URL: https://github.com/llvm/llvm-project/commit/4c26a1e4d7e490a38dcd2a24e4c8939075fd4a5a DIFF: https://github.com/llvm/llvm-project/commit/4c26a1e4d7e490a38dcd2a24e4c8939075fd4a5a.diff LO

[clang] [SystemZ][z/OS] Use the XL pragma pack semantics on z/OS (PR #111053)

2024-10-04 Thread Sean Perry via cfe-commits
https://github.com/perry-ca closed https://github.com/llvm/llvm-project/pull/111053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-10-04 Thread Neil Henning via cfe-commits
sheredom wrote: > > Build machine A with a path E:/foo/header.h which wants to make a PCH from > > it. We want it to remap E:/foo -> Z:/fake. > > What I have in mind is that you have a VFS on build machine A that maps > Z:/fake (virtual path) -> E:/foo (external path), with use-external-names:

[clang] [SystemZ][z/OS] Use the XL pragma pack semantics on z/OS (PR #111053)

2024-10-04 Thread Sean Perry via cfe-commits
https://github.com/perry-ca edited https://github.com/llvm/llvm-project/pull/111053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-10-04 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: > this has also caused the following issue to pop up in our modules build > > ``` > error: variable 'param' cannot be implicitly captured in a lambda with no > capture-default specified > ``` > > hopefully the error provides some guidance for where to look, but I can try > t

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,91 @@ +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; Make sure dxil operation function calls for firstbithigh are generated for all integer types. + +define noundef i16 @test_firstbithigh_ushort(i16 noundef %a)

[clang] Add clang/docs/FunctionEffectAnalysis.rst. (PR #109855)

2024-10-04 Thread Doug Wyatt via cfe-commits
dougsonos wrote: Ping https://github.com/llvm/llvm-project/pull/109855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -86,4 +86,6 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>; def int_dx_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>],

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-10-04 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: > Build machine A with a path E:/foo/header.h which wants to make a PCH from > it. We want it to remap E:/foo -> Z:/fake. What I have in mind is that you have a VFS on build machine A that maps Z:/fake (virtual path) -> E:/foo (external path), with use-external-names: false.

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -18835,6 +18835,22 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { Intrinsic::ID ID = CGM.getHLSLRuntime().getWaveIsFirstLaneIntrinsic(); return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID)); } + case Builtin::BI__builtin_hlsl_wave_read_l

[clang] [llvm] [HLSL] Implementation the `degrees` intrinsic (PR #111209)

2024-10-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/111209 - add degrees builtin - link degrees api in hlsl_intrinsics.h - add degrees intrinsic to IntrinsicDirectX.td - add degrees intrinsic to IntrinsicSPIRV.td - add lowering from clang builtin to d

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

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

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

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

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -18835,6 +18835,22 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { Intrinsic::ID ID = CGM.getHLSLRuntime().getWaveIsFirstLaneIntrinsic(); return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID)); } + case Builtin::BI__builtin_hlsl_wave_read_l

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-04 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: ## Picture of the sizes involved to scale: ``` <-malloc-max--> <-malloc-min---> <--sizeof(posix_acl)---> <-FAME-><(FAME)> ``` `FAME` = flexible array member element (aka `struct posix_acl_entry`) `(F

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,40 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o - | \ +// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DXIL +// RUN: %clang_cc1 -std=hlsl2021 -fincl

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-04 Thread Jan Hendrik Farr via cfe-commits
https://github.com/Cydox converted_to_draft https://github.com/llvm/llvm-project/pull/111015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -83,6 +83,7 @@ def int_dx_umad : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, LLV def int_dx_normalize : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0

[clang] [llvm] [HLSL] Implement the `degrees` intrinsic (PR #111209)

2024-10-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/111209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -2653,6 +2653,22 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, .addUse(GR.getSPIRVTypeID(ResType)) .addUse(GR.getOrCreateConstInt(3, I, IntTy, TII)); } + case Intrinsic::spv_wave_read_lane_at: { +assert(I.getNumOperands() == 4);

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,56 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-compute %s | FileCheck %s + +; Test that for scalar values, WaveReadLaneAt maps down to the DirectX op + +define noundef half @wave_rla_half(half noundef %expr, i32 noundef %idx) #0 { +entry: +; CHECK:

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,56 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-compute %s | FileCheck %s + +; Test that for scalar values, WaveReadLaneAt maps down to the DirectX op + +define noundef half @wave_rla_half(half noundef %expr, i32 noundef %idx) #0 { +entry: +; CHECK:

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,56 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-compute %s | FileCheck %s + +; Test that for scalar values, WaveReadLaneAt maps down to the DirectX op + +define noundef half @wave_rla_half(half noundef %expr, i32 noundef %idx) #0 { +entry: +; CHECK:

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,56 @@ +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-compute %s | FileCheck %s + +; Test that for scalar values, WaveReadLaneAt maps down to the DirectX op + +define noundef half @wave_rla_half(half noundef %expr, i32 noundef %idx) #0 { +entry: +; CHECK:

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,28 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; Test lowering to spir-v backend + +; CHECK-DAG: %[[#uint

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,28 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; Test lowering to spir-v backend + +; CHECK-DAG: %[[#uint

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-04 Thread Justin Bogner via cfe-commits
@@ -489,6 +542,9 @@ class OpLowerer { case Intrinsic::dx_typedBufferStore: HasErrors |= lowerTypedBufferStore(F); break; + case Intrinsic::dx_splitdouble: bogner wrote: There will need to be some logic in DXILOpLowering, because we n

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-10-04 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90933 >From d4ecc690fadc2787425b0b1b94f07ff7f981bdfe Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 13 Sep 2024 08:51:00 -0700 Subject: [PATCH 1/5] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds

[clang] Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
@@ -1048,15 +1048,14 @@ class Analyzer { } void checkIndirectCall(CallExpr *Call, QualType CalleeType) { - auto *FPT = - CalleeType->getAs(); // Null if FunctionType. FunctionEffectKindSet CalleeEffects; - if (FPT) -CalleeEffects.inser

[clang] Effect analysis: correctly detect `(x ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/111224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Effect analysis: correctly detect `(x ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/111224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Effect analysis: correctly detect `(x ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos updated https://github.com/llvm/llvm-project/pull/111224 >From 02398e6398892dac5d151a6e425bf107213e12a8 Mon Sep 17 00:00:00 2001 From: Doug Wyatt Date: Fri, 4 Oct 2024 18:28:37 -0700 Subject: [PATCH 1/2] Effect analysis: correctly detect `(f ? a : b)` as nonblockin

[clang] Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos created https://github.com/llvm/llvm-project/pull/111224 Fix: Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are >From 02398e6398892dac5d151a6e425bf107213e12a8 Mon Sep 17 00:00:00 2001 From: Doug Wyatt Date: Fri, 4 Oct 2024 18:28:37 -0

[clang] Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
@@ -1048,15 +1048,14 @@ class Analyzer { } void checkIndirectCall(CallExpr *Call, QualType CalleeType) { - auto *FPT = - CalleeType->getAs(); // Null if FunctionType. FunctionEffectKindSet CalleeEffects; - if (FPT) -CalleeEffects.inser

[clang] Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
@@ -156,6 +156,16 @@ void nb10( static_cast(fp1)(); // expected-warning {{function with 'nonblocking' attribute must not call non-'nonblocking' expression}} } +// Expression involving indirection +int nb10a() [[clang::nonblocking]]; +int nb10b() [[clang::nonblocking]];

[clang] Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Doug Wyatt (dougsonos) Changes Fix: Effect analysis: correctly detect `(f ? a : b)` as nonblocking when a and b are --- Full diff: https://github.com/llvm/llvm-project/pull/111224.diff 2 Files Affected: - (modified) clang/lib/Sema/Sema

[clang] Effect analysis: correctly detect `(x ? a : b)` as nonblocking when a and b are (PR #111224)

2024-10-04 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos deleted https://github.com/llvm/llvm-project/pull/111224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -1874,6 +1874,24 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_elementwise_firstbithigh: { +if (SemaRef.PrepareBuiltinElementwiseMathOneArgCall(TheCall)) + ret

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,153 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s -DTARGET=dx +// RUN: %clang_cc1 -finclude-default-header -x hlsl -tripl

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-10-04 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: I think it's something much earlier in clang is not using the VFS at all when looking up the main input path, so then it only knows the external path for that case. My guess is that if that were fixed then the ASTWriter/Reader would do the right thing here. https://githu

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,37 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} farzonl wrote: Do you have spirv-tools installed?

[clang] [clang-tools-extra] [flang] [lld] [lldb] [llvm] [NFC] Rename Option parsing related files from OptXYZ -> OptionXYZ (PR #110692)

2024-10-04 Thread Rahul Joshi via cfe-commits
jurahul wrote: more of a hypothetical concern at this point. It's also making file names under Option consistent, in the sense that we have `Option.h` and `Option.cpp` but `OptTable.h` `OptSpecifier.h` and `OptTable.cpp` https://github.com/llvm/llvm-project/pull/110692 ___

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/111082 >From e9ed9f9a0415544781f8334b305eb3916fc0862c Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Mon, 23 Sep 2024 22:10:59 + Subject: [PATCH 1/4] implement firstbithigh hlsl builtin --- clang/include/clang/Ba

[clang] [Clang] Fix __builtin_dynamic_object_size off by 4 (PR #111015)

2024-10-04 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: > AIUI, GCC considers this to be a bug in the face of `counted_by`. The reason > GCC returns "unknown" (`SIZE_MAX`) in the case of a pointer like that is > because (prior to `counted_by`) if the pointer wasn't to local storage, it > could no know if it was a singleton or not. i.e.

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes Adds `@_init_resource_bindings()` function to module initialization that includes `handle.fromBinding` intrinsic calls for simple resource declarations. Arrays of resources or reso

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/111207 Adds `@_init_resource_bindings()` function to module initialization that includes `handle.fromBinding` intrinsic calls for simple resource declarations. Arrays of resources or resources inside user defined types

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota converted_to_draft https://github.com/llvm/llvm-project/pull/111207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/111207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110761 >From 9c69d6584d6b71554aec55f0de52abb4baa9435f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 2 Oct 2024 02:13:51 +0300 Subject: [PATCH 1/7] [Clang] omit parentheses in fold expressions with a single

[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)

2024-10-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110761 >From 9c69d6584d6b71554aec55f0de52abb4baa9435f Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 2 Oct 2024 02:13:51 +0300 Subject: [PATCH 1/6] [Clang] omit parentheses in fold expressions with a single

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/111207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Justin Bogner via cfe-commits
@@ -928,6 +928,78 @@ float3 exp2(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_exp2) float4 exp2(float4); +//===--===// +// firstbithigh builtins +//===

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-10-04 Thread Sarah Spall via cfe-commits
@@ -0,0 +1,37 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} spall wrote: I removed the non-32 bit tests, exce

[clang] [clang-format] clang-format-ignore: Add support for double asterisk patterns (PR #110560)

2024-10-04 Thread Ameer J via cfe-commits
@@ -164,6 +164,40 @@ TEST_F(MatchFilePathTest, Path) { EXPECT_FALSE(match("foo\\", R"(foo*\)")); } +TEST_F(MatchFilePathTest, DoubleAsterisk) { + EXPECT_TRUE(match("a/b/c/d.cpp", "**b**")); + EXPECT_TRUE(match("a/b/c/d.cpp", "**/b/**")); + EXPECT_TRUE(match("a/b/c/d_e.cpp

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/5] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -781,6 +798,9 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVNAME_COFF ".lcovn" #define INSTR_PROF_ORDERFILE_COFF ".lorderfile$M" +// TODO: Placeholder for Windows. We need to revise when we upstream this. qiongsiwu wro

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -3,12 +3,18 @@ /// 4.7 enables cfg_checksum. /// 4.8 (default, compatible with gcov 7) emits the exit block the second. // RUN: rm -rf %t && mkdir %t && cd %t -// RUN: %clang_cc1 -emit-llvm -disable-red-zone -coverage-data-file=/dev/null -coverage-version='304*' %s -o - | \

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -781,6 +798,9 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVNAME_COFF ".lcovn" #define INSTR_PROF_ORDERFILE_COFF ".lorderfile$M" +// TODO: Placeholder for Windows. We need to revise when we upstream this. qiongsiwu wro

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -914,6 +918,7 @@ bool GCOVProfiler::emitProfileNotes( GlobalVariable *Counters = new GlobalVariable( *M, CounterTy, false, GlobalValue::InternalLinkage, Constant::getNullValue(CounterTy), "__llvm_gcov_ctr"); +Counters->setSection("__ll

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -2962,13 +2964,34 @@ void PPCAIXAsmPrinter::emitPGORefs(Module &M) { } } +void PPCAIXAsmPrinter::emitGCOVRefs() { + if (!OutContext.hasXCOFFSection( + "__llvm_gcov_ctr_section", + XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD))) +return; + +

[clang] [HLSL] Collect explicit resource binding information (part 1) (PR #111203)

2024-10-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/111203 >From f545a14e11556c91d10b14617e3588fe5eae6d42 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Fri, 4 Oct 2024 12:21:51 -0700 Subject: [PATCH 1/2] [HLSL] Collect explicit resource binding information (part 1)

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-10-04 Thread Farzon Lotfi via cfe-commits
@@ -489,6 +542,9 @@ class OpLowerer { case Intrinsic::dx_typedBufferStore: HasErrors |= lowerTypedBufferStore(F); break; + case Intrinsic::dx_splitdouble: farzonl wrote: What would require to do it automatically? https://github.com/

[clang] e5b05a5 - [clang-format] Handle template closer followed by braces (#110971)

2024-10-04 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-04T18:18:03-07:00 New Revision: e5b05a51b8151cc7788bbdea4d491e5ccfceedea URL: https://github.com/llvm/llvm-project/commit/e5b05a51b8151cc7788bbdea4d491e5ccfceedea DIFF: https://github.com/llvm/llvm-project/commit/e5b05a51b8151cc7788bbdea4d491e5ccfceedea.diff LOG:

[clang] [clang-format] Handle template closer followed by braces (PR #110971)

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

<    1   2   3   4   >