[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/83906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement `mad` intrinsic (PR #83826)

2024-03-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/83826 >From 6aa6d2cd8b999a0173130f7675f561595ed65d8d Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Sat, 2 Mar 2024 16:40:39 -0500 Subject: [PATCH 1/4] [HLSL] implement mad intrinsic This change implements #83736 T

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread Joseph Huber via cfe-commits
@@ -1122,7 +1122,7 @@ class S_SETREG_B32_Pseudo pattern=[]> : SOPK_Pseudo < pattern>; def S_SETREG_B32 : S_SETREG_B32_Pseudo < - [(int_amdgcn_s_setreg (i32 SIMM16bit:$simm16), i32:$sdst)]> { + [(int_amdgcn_s_setreg (i32 timm:$simm16), i32:$sdst)]> { jhub

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-03-04 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: https://github.com/Sirraide/llvm-project/commit/74fa05dead4d52eef3c33406d05dd1bbaf10d546 https://github.com/llvm/llvm-project/actions/runs/8147057328 Please manually backport the fix and push it to your github fork. Once this is done, please create a [p

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Vadim D. via cfe-commits
@@ -2363,8 +2356,11 @@ void InitListChecker::CheckStructUnionTypes( } // Emit warnings for missing struct field initializers. - if (!VerifyOnly && InitializedSomething && CheckForMissingFields && - !RD->isUnion()) { + // This check is disabled for designated initial

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1122,7 +1122,7 @@ class S_SETREG_B32_Pseudo pattern=[]> : SOPK_Pseudo < pattern>; def S_SETREG_B32 : S_SETREG_B32_Pseudo < - [(int_amdgcn_s_setreg (i32 SIMM16bit:$simm16), i32:$sdst)]> { + [(int_amdgcn_s_setreg (i32 timm:$simm16), i32:$sdst)]> { ramp

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-04 Thread via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/83887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-03-04 Thread via cfe-commits
Sirraide wrote: /cherry-pick https://github.com/Sirraide/llvm-project/commit/74fa05dead4d52eef3c33406d05dd1bbaf10d546 https://github.com/llvm/llvm-project/pull/83103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Timothy Herchen via cfe-commits
anematode wrote: It's used 100+ more times through the macro `_RET_IP_`. https://elixir.bootlin.com/linux/latest/source/include/linux/instruction_pointer.h#L7 https://elixir.bootlin.com/linux/latest/source/include/linux/kasan.h#L164 has some example uses where `always_inline` is important for

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/83906 >From d7e20596434636753610ceb4326ddc1116f0bdce Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 1 Mar 2024 15:28:32 -0600 Subject: [PATCH] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' Summary:

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 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 32e2294b8abba6b70356aa37b65acf155506d457 b1f15246bad1d52041abf0d25840d4d7026de43a --

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Note that this patch is not quite ready to land. I encountered issues when working with `s_setreg`. The listing of `SOPK` instructions should have this as an instruction that takes a 16-bit zero extended immediate value. However, this was apparently not the case for the `s_setre

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) Changes Summary: This patch implements the LLVM floating point environment control intrinsics and also exposes it through clang. We encode the floating point environment as a 64-bit value that simply concaten

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes Summary: This patch implements the LLVM floating point environment control intrinsics and also exposes it through clang. We encode the floating point environment as a 64-bit value that simply concatena

[clang] [llvm] [AMDGPU] Implement 'llvm.get.fpenv' and 'llvm.set.fpenv' (PR #83906)

2024-03-04 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/83906 Summary: This patch implements the LLVM floating point environment control intrinsics and also exposes it through clang. We encode the floating point environment as a 64-bit value that simply concatenates the valu

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/81364 >From f73060f7f09a747c90fa559641abd8c72f4ee66f Mon Sep 17 00:00:00 2001 From: vvd170501 <36827317+vvd170...@users.noreply.github.com> Date: Sat, 10 Feb 2024 19:19:52 +0300 Subject: [PATCH 1/6] Add -Wmissing-desi

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/81364 >From f73060f7f09a747c90fa559641abd8c72f4ee66f Mon Sep 17 00:00:00 2001 From: vvd170501 <36827317+vvd170...@users.noreply.github.com> Date: Sat, 10 Feb 2024 19:19:52 +0300 Subject: [PATCH 1/5] Add -Wmissing-desi

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-03-04 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: d23ef9ef3685eb42ebf719bc28cfe2e4651932fc https://github.com/llvm/llvm-project/actions/runs/8146857249 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-projec

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-03-04 Thread via cfe-commits
Sirraide wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/d23ef9ef3685eb42ebf719bc28cfe2e4651932fc https://github.com/llvm/llvm-project/pull/83103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-03-04 Thread via cfe-commits
https://github.com/Sirraide milestoned https://github.com/llvm/llvm-project/pull/83103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bb97c99 - [OpenACC] Enable serial/kernels Compute Constructs

2024-03-04 Thread via cfe-commits
Author: erichkeane Date: 2024-03-04T12:47:18-08:00 New Revision: bb97c992834a24632629dec4ec79ea7ffd1261fa URL: https://github.com/llvm/llvm-project/commit/bb97c992834a24632629dec4ec79ea7ffd1261fa DIFF: https://github.com/llvm/llvm-project/commit/bb97c992834a24632629dec4ec79ea7ffd1261fa.diff LO

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > Does anyone understand why Linux uses __builtin_return_address there? Grep turns up 257 callers of `__builtin_return_address` in the linux kernel sources. Hard to say definitely for all cases. It's possible that some are incorrect, or should have their callers explic

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Timothy Herchen via cfe-commits
anematode wrote: > Although I seem to remember having seen code that uses `always_inline` in > order to force `__builtin_return_address` to actually apply to its caller. Right; that's why I thought just disabling inlining would be a suboptimal choice, although I guess you could have `always_in

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Timothy Herchen via cfe-commits
anematode wrote: > I'm seeing evidence that this might be a chatty diagnostic in practice: > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/kernel/fork.c?L311 > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread John McCall via cfe-commits
rjmccall wrote: > I'm seeing evidence that this might be a chatty diagnostic in practice: > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/kernel/fork.c?L311 > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-04 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > I'm seeing evidence that this might be a chatty diagnostic in practice: > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/kernel/fork.c?L311 > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecb

[clang] [llvm] [HLSL] implement the any intrinsic (PR #83903)

2024-03-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes This PR implements the frontend for #70076 This PR is part 1 of 2. Part 2 depends on `DXILIntrinsicExpansion.cpp` in [dixl-lerp-intrinsic-lowering PR](https://github.com/llvm/llvm-project/compare/main...farzo

[clang] [llvm] [HLSL] implement the any intrinsic (PR #83903)

2024-03-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/83903 This PR implements the frontend for #70076 This PR is part 1 of 2. Part 2 depends on `DXILIntrinsicExpansion.cpp` in [dixl-lerp-intrinsic-lowering PR](https://github.com/llvm/llvm-project/compare/main...farzonl:l

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Francesco Petrogalli via cfe-commits
@@ -0,0 +1,79 @@ +// RUN: clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins | FileCheck %s +// RUN: not clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins -DERROR_EXPECTED_LANES 2>&1 | FileCheck %s --check-prefix=ERROR_EXPECTED_LANES +// RUN: not

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli updated https://github.com/llvm/llvm-project/pull/83584 >From 53d9fe77500a18884f200c49db57336324305620 Mon Sep 17 00:00:00 2001 From: Francesco Petrogalli Date: Fri, 1 Mar 2024 16:23:57 +0100 Subject: [PATCH 1/3] [clang][Builtins] Parse clang extended vectors type

[clang] [llvm] [HLSL] implement the rcp intrinsic (PR #83857)

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

[clang] [Clang] [Sema] Handle placeholders in '.*' expressions (PR #83103)

2024-03-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman @Sirraide would this patch be reasonable to backport to the > 18.x release branch? It fixes a problem with our application on the > FreeBSD-CURRENT branch. > [SerenityOS/serenity#23365](https://github.com/SerenityOS/serenity/issues/23365) Yeah, I think the

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-04 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin I've reflected your suggestions in the code. Could you help me to land this PR, if you it looks good to you? https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-03-04 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/8] [clang] Support `__is_trivially_copyable(int()&)==false` IM

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli updated https://github.com/llvm/llvm-project/pull/83584 >From 53d9fe77500a18884f200c49db57336324305620 Mon Sep 17 00:00:00 2001 From: Francesco Petrogalli Date: Fri, 1 Mar 2024 16:23:57 +0100 Subject: [PATCH 1/2] [clang][Builtins] Parse clang extended vectors type

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -28,4 +36,28 @@ void *foo() { return RA<2>(); // expected-note{{in instantiation of function template specialization 'RA<2>' requested here}} } -#endif + +void* f() { + return ([&] () { +return __builtin_frame_address(0); // expected-warning{{calling '__builtin_frame

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -2730,17 +2730,33 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, if (SemaBuiltinConstantArgRange(TheCall, 0, 0, 0x)) return ExprError(); -// -Wframe-address warning if non-zero passed to builtin -// return/frame address.

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I'm seeing evidence that this might be a chatty diagnostic in practice: https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/kernel/fork.c?L311 https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8c

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -2730,17 +2730,33 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, if (SemaBuiltinConstantArgRange(TheCall, 0, 0, 0x)) return ExprError(); -// -Wframe-address warning if non-zero passed to builtin -// return/frame address.

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -2029,6 +2029,10 @@ def warn_frame_address : Warning< "calling '%0' with a nonzero argument is unsafe">, InGroup, DefaultIgnore; +def warn_frame_address_missing_noinline: Warning< + "calling '%0' in function not marked __attribute__((noinline)) may return a caller's %

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/82966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -2730,17 +2730,33 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, if (SemaBuiltinConstantArgRange(TheCall, 0, 0, 0x)) return ExprError(); -// -Wframe-address warning if non-zero passed to builtin -// return/frame address.

[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread via cfe-commits
github-actions[bot] wrote: @PeterChou1 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 bui

[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

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

[clang] 3b5965e - [clang-format][doc] fix documentation for clang-format (#83415)

2024-03-04 Thread via cfe-commits
Author: PeterChou1 Date: 2024-03-04T21:15:17+01:00 New Revision: 3b5965e633bf6f945436dc8ac33bbb37ace4acf1 URL: https://github.com/llvm/llvm-project/commit/3b5965e633bf6f945436dc8ac33bbb37ace4acf1 DIFF: https://github.com/llvm/llvm-project/commit/3b5965e633bf6f945436dc8ac33bbb37ace4acf1.diff LO

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-04 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 requested changes to this pull request. These need the vendor "sf." prefix https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-04 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Besides the [non-elf warning](https://github.com/llvm/llvm-project/pull/66825#issuecomment-1968344800), I did some clean-ups (e.g., [delete braces around one-line if/loop](https://github.com/llvm/llvm-project/pull/66825#issuecomment-1968344800) and merges. Planning to merg

[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-04 Thread via cfe-commits
PeterChou1 wrote: Thanks @owenca. I don’t have commit access, can you merge this PR for me? https://github.com/llvm/llvm-project/pull/83415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [HIP] fix host-used external kernel (PR #83870)

2024-03-04 Thread Artem Belevich via cfe-commits
@@ -24,6 +24,7 @@ // NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel2v // NEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel3v +// XEG-NOT: @__clang_gpu_used_external = {{.*}} @_Z7kernel5v Artem-B wrote: Did you mean `NEG-NOT` ? https://github.c

[clang] [HIP] fix host-used external kernel (PR #83870)

2024-03-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/83870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] fix host-used external kernel (PR #83870)

2024-03-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM in principle, but I'd run it by someone with more familiarity with linking quirks. @MaskRay PTAL, when you get a chance. https://github.com/llvm/llvm-project/pull/83870 ___ cfe-commits maili

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-04 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH 1/2] [CLANGD] Do not crash on designator initializatio

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-04 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From 9434f834c4d48559aeec94403c927f48b15763e3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/3] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instru

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-04 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH] [CLANGD] Do not crash on designator initialization of

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-04 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From 9434f834c4d48559aeec94403c927f48b15763e3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/2] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instru

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-04 Thread Yingwei Zheng via cfe-commits
@@ -60,6 +60,8 @@ // CHECK-NOT: __riscv_xsfvfwmaccqqq {{.*$}} // CHECK-NOT: __riscv_xsfqmaccdod {{.*$}} // CHECK-NOT: __riscv_xsfvqmaccqoq {{.*$}} +// CHECK-NOT: __riscv_sifivecdiscarddlone {{.*$}} +// CHECK-NOT: __riscv_sifivecflushdlone {{.*$}} dtcxzyw wrote:

[clang] [llvm] [HLSL] implement exp intrinsic (PR #83832)

2024-03-04 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/83832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes These were in LLVM 17 but removed from LLVM 18 due to an incorrect extension name being used. This restores them with new extension names that match SiFive's downstream c

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-04 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/83896 These were in LLVM 17 but removed from LLVM 18 due to an incorrect extension name being used. This restores them with new extension names that match SiFive's downstream compiler. The extension name has been use

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-04 Thread Artem Belevich via cfe-commits
@@ -906,6 +906,16 @@ CreateFileHandler(MemoryBuffer &FirstInput, } OffloadBundlerConfig::OffloadBundlerConfig() { + if (llvm::compression::zstd::isAvailable()) { +CompressionFormat = llvm::compression::Format::Zstd; +// Use a high zstd compress level by default for be

[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for LLDB tuning, unless -ggnu-pubnames is specified. (PR #83331)

2024-03-04 Thread Greg Clayton via cfe-commits
https://github.com/clayborg commented: LGTM, but I will let the code owners here accept https://github.com/llvm/llvm-project/pull/83331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -85,6 +123,23 @@ class PrototypeParser { if (Substitution.empty()) PrintFatalError(Loc, "Not a template"); ParseType(Substitution); +} else if (T.consume_front("_ExtVector")) { + // Clang extended vector types are mangled as follows: + // +

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from some extra test coverage and maybe a comment to be added. https://github.com/llvm/llvm-project/pull/83584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,79 @@ +// RUN: clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins | FileCheck %s +// RUN: not clang-tblgen -I %p/../../../clang/include/ %s --gen-clang-builtins -DERROR_EXPECTED_LANES 2>&1 | FileCheck %s --check-prefix=ERROR_EXPECTED_LANES +// RUN: not

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/83584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement exp intrinsic (PR #83832)

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

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-04 Thread via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86 + +// Check that for 'F _Complex + int' (F = real floating-point type), we emit an +// implicit cast from 'int' to 'F', but NOT to 'F _Complex' (i.e. that

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-04 Thread via cfe-commits
@@ -1114,8 +1114,6 @@ static bool handleIntegerToComplexFloatConversion(Sema &S, ExprResult &IntExpr, if (IntTy->isIntegerType()) { QualType fpTy = ComplexTy->castAs()->getElementType(); IntExpr = S.ImpCastExprToType(IntExpr.get(), fpTy, CK_IntegralToFloating); -

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -1,5 +1,5 @@ -// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -Wno-int-conversion -Wno-strict-prototypes -Wno-tautological-constant-compare -Wtautological-unsigned-zero-compare -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-purge=none -verify %s -Wno-

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -1,5 +1,5 @@ // XFAIL: target=aarch64-pc-windows-msvc -// RUN: %clang_cc1 -Wno-return-type -Wno-unused-value -emit-llvm %s -w -o - | FileCheck %s +// RUN: %clang_cc1 -Wno-return-type -Wno-return-mismatch -Wno-unused-value -emit-llvm %s -w -o - | FileCheck %s

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -Wno-error=implicit-int -verify -fblocks -Wno-unreachable-code -Wno-unused-value -Wno-strict-prototypes +// RUN: %clang_cc1 -triple x86_64-apple-darwin9

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/82872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the changes! Please be sure to add a release note to `clang/docs/ReleaseNotes.rst` so users know about the new diagnostic flag, and the changes should come with more test coverage. I'd like to see to see a test with `-Wreturn-type -Wno-r

[clang] [clang][Builtins] Parse clang extended vectors types. (PR #83584)

2024-03-04 Thread Francesco Petrogalli via cfe-commits
@@ -85,6 +123,23 @@ class PrototypeParser { if (Substitution.empty()) PrintFatalError(Loc, "Not a template"); ParseType(Substitution); +} else if (T.consume_front("_ExtVector")) { + // Clang extended vector types are mangled as follows: + // +

[clang] [llvm] [HLSL] implement exp intrinsic (PR #83832)

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

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Erich Keane via cfe-commits
@@ -2363,8 +2356,11 @@ void InitListChecker::CheckStructUnionTypes( } // Emit warnings for missing struct field initializers. - if (!VerifyOnly && InitializedSomething && CheckForMissingFields && - !RD->isUnion()) { + // This check is disabled for designated initial

[clang] [clang][test] Add test for incompatible cv-qualified reference types in conversion function template (PR #81950)

2024-03-04 Thread Duo Wang via cfe-commits
wdunicornpro wrote: ping https://github.com/llvm/llvm-project/pull/81950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -22,7 +58,10 @@ #define WANT_BAR 1 // expected-note{{macro was defined here}} @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} -//

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -1,3 +1,39 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: %clang_cc1 -std=c99 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -DWANT_FOO=1 -emit-module -fmodule-name=config %t/module.modulemap +// RUN: %clang_cc1 -std=c99 -fmodules -fimplicit

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -22,7 +58,10 @@ #define WANT_BAR 1 // expected-note{{macro was defined here}} @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} -//

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -2006,6 +2021,11 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, if (auto MaybeModule = MM.getCachedModuleLoad(*Path[0].first)) { // Use the cached result, which may be nullptr. Module = *MaybeModule; +// Config macros are already checked before build

[clang] [clang] Diagnose config_macros before building modules (PR #83641)

2024-03-04 Thread Volodymyr Sapsai via cfe-commits
@@ -22,7 +58,10 @@ #define WANT_BAR 1 // expected-note{{macro was defined here}} @import config; // expected-warning{{definition of configuration macro 'WANT_BAR' has no effect on the import of 'config'; pass '-DWANT_BAR=...' on the command line to configure the module}} -//

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -2363,8 +2356,11 @@ void InitListChecker::CheckStructUnionTypes( } // Emit warnings for missing struct field initializers. - if (!VerifyOnly && InitializedSomething && CheckForMissingFields && - !RD->isUnion()) { + // This check is disabled for designated initial

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-03-04 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s ahatanak wrote: Do we want to add a clang test? I thought we generally don't enable optimization in clang CodeGen tests because it

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -148,6 +148,10 @@ Non-comprehensive list of changes in this release New Compiler Flags -- +- ``-Wmissing-designated-field-initializers``, grouped under ``-Wmissing-designated-field-initializers``. + This diagnostic can be disabled to make ``-Wmissing-desi

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Changes mostly LGTM aside from some minor nits. https://github.com/llvm/llvm-project/pull/81364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -120,6 +120,10 @@ Non-comprehensive list of changes in this release New Compiler Flags -- +- ``-Wmissing-designated-field-initializers``, grouped under ``-Wmissing-designated-field-initializers``. AaronBallman wrote: ```suggestion - ``-Wmi

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-03-04 Thread Aaron Ballman via cfe-commits
@@ -120,6 +120,10 @@ Non-comprehensive list of changes in this release New Compiler Flags -- +- ``-Wmissing-designated-field-initializers``, grouped under ``-Wmissing-designated-field-initializers``. AaronBallman wrote: I think it would be go

[clang-tools-extra] [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (PR #82673)

2024-03-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/82673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] b32845c - [clang-tidy] Let `bugprone-use-after-move` also handle calls to `std::forward` (#82673)

2024-03-04 Thread via cfe-commits
Author: AMS21 Date: 2024-03-04T19:56:15+01:00 New Revision: b32845cb94a81e6fd8b01a8631e3d276c9fc9e35 URL: https://github.com/llvm/llvm-project/commit/b32845cb94a81e6fd8b01a8631e3d276c9fc9e35 DIFF: https://github.com/llvm/llvm-project/commit/b32845cb94a81e6fd8b01a8631e3d276c9fc9e35.diff LOG: [c

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-03-04 Thread Akira Hatanaka via cfe-commits
@@ -3424,6 +3443,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation * +CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, +

[clang] [FMV] Allow target version definitions in any order. (PR #83887)

2024-03-04 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. Thank you, this is great! https://github.com/llvm/llvm-project/pull/83887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HIP] add --offload-compression-level= option (PR #83605)

2024-03-04 Thread Artem Belevich via cfe-commits
@@ -942,20 +942,28 @@ CompressedOffloadBundle::compress(const llvm::MemoryBuffer &Input, Input.getBuffer().size()); llvm::compression::Format CompressionFormat; + int Level; - if (llvm::compression::zstd::isAvailable()) + if (llvm::compression::zstd::isAvailable(

[clang] [llvm] [HLSL] implement `mad` intrinsic (PR #83826)

2024-03-04 Thread Farzon Lotfi via cfe-commits
@@ -19812,11 +19821,13 @@ bool Sema::SemaBuiltinElementwiseTernaryMath(CallExpr *TheCall) { Args[I] = Converted.get(); } - int ArgOrdinal = 1; - for (Expr *Arg : Args) { -if (checkFPMathBuiltinElementType(*this, Arg->getBeginLoc(), Arg->getType(), -

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-04 Thread Joshua Cranmer via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86 + +// Check that for 'F _Complex + int' (F = real floating-point type), we emit an +// implicit cast from 'int' to 'F', but NOT to 'F _Complex' (i.e. that

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-04 Thread Joshua Cranmer via cfe-commits
@@ -1114,8 +1114,6 @@ static bool handleIntegerToComplexFloatConversion(Sema &S, ExprResult &IntExpr, if (IntTy->isIntegerType()) { QualType fpTy = ComplexTy->castAs()->getElementType(); IntExpr = S.ImpCastExprToType(IntExpr.get(), fpTy, CK_IntegralToFloating); -

[clang] [llvm] [HLSL] implement `mad` intrinsic (PR #83826)

2024-03-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/83826 >From 6aa6d2cd8b999a0173130f7675f561595ed65d8d Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Sat, 2 Mar 2024 16:40:39 -0500 Subject: [PATCH 1/4] [HLSL] implement mad intrinsic This change implements #83736 T

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-04 Thread Richard Smith via cfe-commits
zygoloid wrote: > It does fix the example given. #83400 has 6 real-world examples. This patch fixes none of them. It also has a reduced testcase, which this patch does fix. But fixing the reduced testcase without fixing the real-world examples is not fixing the bug. https://github.com/llvm/l

<    1   2   3   4   5   6   >