[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-16 Thread Nathan Gauër via cfe-commits
Keenuts wrote: Rebased on main. Also had to apply a few changes: - fixed valid expensive checks issues caused by this PR (irreflexible iterator) This was because the BB order check was saying `A < A`. - fixed codegen instability caused by the block sorting. To satisfy both the SPIR-V spec an

[clang] fix(clang/**.py): fix comparison to None (PR #94014)

2024-09-16 Thread Christian Ulmann via cfe-commits
Dinistro wrote: Do you have commit rights to land this or should I do it? https://github.com/llvm/llvm-project/pull/94014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-16 Thread Aaron Ballman via cfe-commits
@@ -85,6 +85,7 @@ add_clang_library(clangDriver ToolChains/PPCFreeBSD.cpp ToolChains/InterfaceStubs.cpp ToolChains/ZOS.cpp + ToolChains/SYCL.cpp AaronBallman wrote: You should keep this alphabetized https://github.com/llvm/llvm-project/pull/107493

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,202 @@ +//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,202 @@ +//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-09-16 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,202 @@ +//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] Implementing `asfloat` using `bit_cast` (PR #108686)

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

[clang] 0bc8168 - [clang][bytecode] Fix reinterpret_casts from pointer to non-pointers (#108811)

2024-09-16 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-16T17:35:38+02:00 New Revision: 0bc8168070677ef08d58864477d95ebdef917d0c URL: https://github.com/llvm/llvm-project/commit/0bc8168070677ef08d58864477d95ebdef917d0c DIFF: https://github.com/llvm/llvm-project/commit/0bc8168070677ef08d58864477d95ebdef917d0c.diff L

[clang] [clang][bytecode] Fix reinterpret_casts from pointer to non-pointers (PR #108811)

2024-09-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/108811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Don't warn when -S and -c are used together without -fsyntax-only (PR #104477)

2024-09-16 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/104477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ast-matcher] Fixed a crash when traverse lambda expr with invalid captures (PR #108689)

2024-09-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a release note nit, thank you! https://github.com/llvm/llvm-project/pull/108689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [ast-matcher] Fixed a crash when traverse lambda expr with invalid captures (PR #108689)

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

[clang] [ast-matcher] Fixed a crash when traverse lambda expr with invalid captures (PR #108689)

2024-09-16 Thread Aaron Ballman via cfe-commits
@@ -504,6 +504,8 @@ AST Matchers - Fixed an ordering issue with the `hasOperands` matcher occuring when setting a binding in the first matcher and using it in the second matcher. +- Fixed a crash when traverse lambda expr with invalid captures. AaronBallman

[clang] [clang-tools-extra] Fix OOM in FormatDiagnostic (PR #108187)

2024-09-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang-tools-extra,clang` at step 6 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/9025 Here

[clang] [NFC][clang][TableGen] Remove redundant llvm:: namespace qualifier (PR #108627)

2024-09-16 Thread Rahul Joshi via cfe-commits
jurahul wrote: I see that the warning is not yet implemented in clang, but its in GCC, so only GCC based builds flagged it as an error. So what we really need it a GCC based build, which is not a tweak. https://github.com/llvm/llvm-project/pull/108627 __

[clang] [HLSL][Docs] Update function calls docs (PR #106860)

2024-09-16 Thread Sarah Spall via cfe-commits
@@ -248,13 +248,14 @@ which is a term made up for HLSL. A cx-value is a temporary value which may be the result of a cast, and stores its value back to an lvalue when the value expires. -To represent this concept in Clang we introduce a new ``HLSLOutParamExpr``. An -``HLSLOut

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing created https://github.com/llvm/llvm-project/pull/108849 This change implements the frontend for #99118 Builtins.td - add the fmod builtin CGBuiltin.cpp - add the builtin to DirectX intrinsic mapping hlsl_intrinsics.h - add the fmod api SemaH

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Zhengxing li (lizhengxing) Changes This change implements the frontend for #99118 Builtins.td - add the fmod builtin CGBuiltin.cpp - add the builtin to DirectX intrinsic mapping hlsl_intrinsics.h - add the fmod

[clang] The real option name and not the alias used is displayed in msgs when using a config file (PR #107613)

2024-09-16 Thread Sean Perry via cfe-commits
perry-ca wrote: @mgorny could you review this too. Thanks. https://github.com/llvm/llvm-project/pull/107613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-16 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/107397 >From 621578de568be1e71665254060956ea1971965c9 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 5 Sep 2024 05:42:26 -0700 Subject: [PATCH 1/8] [NFC] Move warning from COdeGen to Sema. --- clang/i

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-16 Thread Zahira Ammarguellat via cfe-commits
@@ -7964,6 +7964,12 @@ class Sema final : public SemaBase { /// Do an explicit extend of the given block pointer if we're in ARC. void maybeExtendBlockObject(ExprResult &E); + std::vector> + ExcessPrecisionNotSatisfied; + unsigned NumExcessPrecisionNotSatisfied = 0;

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Nicolas van Kempen via cfe-commits
@@ -109,7 +109,7 @@ Options .. code-block:: c++ -std::print("{} {}\n", static_cast(i), static_cast(u)); +std::print("{} {}\n", static_cast(u), static_cast(i)); nicovank wrote: The arguments shouldn't be swapped, I think the initial code block above

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank commented: I think the example should be: ```cpp printf("%u %d\n", i, u); // Change here. // transforms to: std::println("{} {}", static_cast(i), static_cast(u)); // No change here. ``` https://github.com/llvm/llvm-project/pull/108805

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/108805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] The real option name and not the alias used is displayed in msgs when using a config file (PR #107613)

2024-09-16 Thread Michał Górny via cfe-commits
https://github.com/mgorny approved this pull request. Seems to make sense and is roughly consistent with the code above. https://github.com/llvm/llvm-project/pull/107613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/108853 On some targets, an FP libcall with argument types such as long double will be lowered to pass arguments indirectly via pointers. When this is the case we should not mark the libcall with "int" TBAA as it may lead

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Benjamin Maxwell (MacDue) Changes On some targets, an FP libcall with argument types such as long double will be lowered to pass arguments indirectly via pointers. When this is the case we should not mark the libcall with "int" TBAA

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-16 Thread via cfe-commits
nebulark wrote: @tru No, this is my first llvm pr. I'd appreciate you doing it :) https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM, but it would be nice for @cor3ntin to rubber-stamp it before merging. https://github.com/llvm/llvm-project/pull/108817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: Note the first commit (https://github.com/llvm/llvm-project/pull/108853/commits/6db9f6d56f0bbd56d017156f858eae68653fbd1b) shows a correctness issue with what's currently upstream as the `load x86_fp80` is incorrectly marked with "int" TBAA metadata (overwriting its metadata for

[clang] Don't emit int TBAA metadata on more complex FP math libcalls. (PR #107598)

2024-09-16 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/107598 >From 0763f8d25194e18a040d4cd4cde7c88b6fccbb44 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Fri, 6 Sep 2024 08:01:25 -0700 Subject: [PATCH 1/6] Don't emit int TBAA metadata on more complex FP math

[clang] [clang][codegen] Fix possible crash when setting TBAA metadata on FP math libcalls (PR #108575)

2024-09-16 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: Thanks for the reduction! I tracked this down to the "int" TBAA metadata being added to calls with indirect arguments (with seems broken even without this change). I've created a possible fix here: https://github.com/llvm/llvm-project/pull/108853#event-14276322905. https://gi

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-16 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: Oh, thank you for suggestion! Seems like got access. So I will push this pr to test if it works. Thank you =) https://github.com/llvm/llvm-project/pull/104599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] 4c6f313 - [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (#104599)

2024-09-16 Thread via cfe-commits
Author: Pavel Skripkin Date: 2024-09-16T19:44:13+03:00 New Revision: 4c6f313cb340c435f47ac032857030768c81c341 URL: https://github.com/llvm/llvm-project/commit/4c6f313cb340c435f47ac032857030768c81c341 DIFF: https://github.com/llvm/llvm-project/commit/4c6f313cb340c435f47ac032857030768c81c341.diff

[clang] [analyzer] [MallocChecker] suspect all release functions as candidate for suppression (PR #104599)

2024-09-16 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag closed https://github.com/llvm/llvm-project/pull/104599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: cc @mikecrowe https://github.com/llvm/llvm-project/pull/108805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -90,4 +90,5 @@ 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] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-16 Thread Yeoul Na via cfe-commits
@@ -1105,16 +1120,16 @@ enum AttributeDeclKind { inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, const ParsedAttr &At) { - DB.AddTaggedVal(reinterpret_cast(At.getAttrName()), + const IdentifierInfo *Att

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -18709,6 +18709,25 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, CGM.getHLSLRuntime().getNormalizeIntrinsic(), ArrayRef{X}, nullptr, "hlsl.normalize"); } + case Builtin::BI__builtin_hlsl_elementwise_fmod: { farzonl wr

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -4782,6 +4782,12 @@ def HLSLStep: LangBuiltin<"HLSL_LANG"> { let Prototype = "void(...)"; } +def HLSLFmod : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_elementwise_fmod"]; farzonl wrote: rename to `__builtin_elementwise_fmod` the add a

[clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/108769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-16 Thread Yeoul Na via cfe-commits
@@ -5055,6 +5058,17 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA, bool EnterScope, ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, nullptr, nullptr, SourceLocation(), ParsedAttr::Form::GNU(), nullptr); + const auto &SM = P

[clang] [llvm] [clang][OpenMP] Prototype #1 of directive splitting (PR #108855)

2024-09-16 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 bc54e5636f2080e6a35ec201d5963a2c455fe5f5 a50b7c891330ae16c7b9559f23afa6fcbfe7c391 --e

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,38 @@ + +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_too_few_arg() { + return __builtin_hlsl_elementwise_fmod(); + // ex

[clang] [Clang] Start moving X86Builtins.def to X86Builtins.td (PR #106005)

2024-09-16 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,137 @@ +//===--- BuiltinsX86.td - X86 Builtin function database -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/108857 Adds __ARM_ACLE_VERSION and __FUNCTION_MULTI_VERSIONING_SUPPORT_LEVEL as defined here https://github.com/ARM-software/acle/pull/301 and here https://github.com/ARM-software/acle/pull/302. Also bumps __ARM_ACL

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-aarch64 Author: Alexandros Lamprineas (labrinea) Changes Adds __ARM_ACLE_VERSION and __FUNCTION_MULTI_VERSIONING_SUPPORT_LEVEL as defined here https://github.com/ARM-software/acle/pull/301 and here https://github.com/

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-16 Thread Erich Keane via cfe-commits
@@ -5055,6 +5058,17 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA, bool EnterScope, ParseGNUAttributeArgs(&LA.AttrName, LA.AttrNameLoc, Attrs, nullptr, nullptr, SourceLocation(), ParsedAttr::Form::GNU(), nullptr); + const auto &SM = P

[clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-16 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 4b27b5800f8c94ec010213e2a4ddf552cc282bce...800010fabe3160e701ff58f7789dd9e01c80451f clang

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -18709,6 +18709,25 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, CGM.getHLSLRuntime().getNormalizeIntrinsic(), ArrayRef{X}, nullptr, "hlsl.normalize"); } + case Builtin::BI__builtin_hlsl_elementwise_fmod: { +Value *Op0 = EmitScala

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Mainak Sil via cfe-commits
https://github.com/MainakSil updated https://github.com/llvm/llvm-project/pull/108805 >From 20b262e9954ec1505b1be4ea3cc362b2a9955bb9 Mon Sep 17 00:00:00 2001 From: Mainak Sil Date: Sun, 15 Sep 2024 22:03:43 +0530 Subject: [PATCH 1/3] [docs][clang-tidy] Correct StrictMode example in modernize-u

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Mainak Sil via cfe-commits
MainakSil wrote: Please check now. https://github.com/llvm/llvm-project/pull/108805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Double-checking: we want to diagnose when higher precision is requested but cannot be honored and failing to honor the request leads to an observable change in behavior and the only time that should happen currently is with complex division, so that's

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Zhengxing li via cfe-commits
@@ -90,4 +90,5 @@ 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] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
@@ -399,7 +399,14 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__AARCH64_CMODEL_" + CodeModel + "__"); // ACLE predefines. Many can only have one possible value on v8 AArch64. - Builder.defineMacro("__ARM_ACLE", "200"); + Bui

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -90,4 +90,5 @@ 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] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
@@ -399,7 +399,14 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts, Builder.defineMacro("__AARCH64_CMODEL_" + CodeModel + "__"); // ACLE predefines. Many can only have one possible value on v8 AArch64. - Builder.defineMacro("__ARM_ACLE", "200"); + Bui

[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)

2024-09-16 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss requested changes to this pull request. otherwise looks reasonable to me. https://github.com/llvm/llvm-project/pull/108857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

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

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

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

[clang] [llvm] [AMDGPU] Change CF intrinsics lowering to reconverge on predecessors (PR #108596)

2024-09-16 Thread via cfe-commits
alex-t wrote: > I agree with Jay that this change isn't acceptable from a codegen quality > point of view. > > > Then it appeared that instructions loading the values spilled to the memory > > and used in the current block must be placed at the block beginning before > > they are used but aft

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Mike Crowe via cfe-commits
mikecrowe wrote: Thanks for fixing this @MainakSil. I wasn't aware of the bug report until now. @nicovank is correct that only the format string needs to change as I got the format specifiers the wrong way round originally. Thanks for adding me to this change. I copied the same mistake to `us

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -90,4 +90,5 @@ 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] f5ba3e1 - [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (#106369)

2024-09-16 Thread via cfe-commits
Author: nebulark Date: 2024-09-16T19:29:42+02:00 New Revision: f5ba3e1fa6b5f862789786fbb4b342dfc2c27c33 URL: https://github.com/llvm/llvm-project/commit/f5ba3e1fa6b5f862789786fbb4b342dfc2c27c33 DIFF: https://github.com/llvm/llvm-project/commit/f5ba3e1fa6b5f862789786fbb4b342dfc2c27c33.diff LOG:

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-16 Thread Tobias Hieta via cfe-commits
https://github.com/tru closed https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-16 Thread Tobias Hieta via cfe-commits
tru wrote: > @tru No, this is my first llvm pr. I'd appreciate you doing it :) Thanks for your contribution! https://github.com/llvm/llvm-project/pull/106369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-09-16 Thread via cfe-commits
github-actions[bot] wrote: @nebulark 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 build

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-16 Thread Yuxuan Chen via cfe-commits
@@ -249,7 +249,10 @@ Attribute Changes in Clang (#GH106864) - Introduced a new attribute ``[[clang::coro_await_elidable]]`` on coroutine return types - to express elideability at call sites where the coroutine is co_awaited as a prvalue. + to express elideability at call

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

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

[clang] [llvm] [HLSL] Implementation of the fmod intrinsic (PR #108849)

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

[clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/108769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-16 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Thanks a lot for the fix! Except for the syntax error noted by the CI and my other comment, this looks good to me. https://github.com/llvm/llvm-project/pull/108769 ___ cfe-commits mailing list cfe-commits@li

[clang] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-16 Thread Jannick Kremer via cfe-commits
@@ -570,6 +570,25 @@ def test_enum_values_cpp(self): self.assertEqual(ham.kind, CursorKind.ENUM_CONSTANT_DECL) self.assertEqual(ham.enum_value, 0x100) +def test_enum_values_on_elaborated_type(self): +tu = get_tu( +"using myUType

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM but it would be nice to do the other changes to cxx_dr_status as a separate (NFC) commit https://github.com/llvm/llvm-project/pull/108817 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [llvm] [AMDGPU] Change CF intrinsics lowering to reconverge on predecessors (PR #108596)

2024-09-16 Thread via cfe-commits
alex-t wrote: Honestly, I don't like the way this change affects the code generation quality. I would not ever try to propose it provided we have another way to achieve correctness. Currently, we have a compiler that either produces incorrect code or fails to compile a valid input. Speaking ab

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-16 Thread Yuxuan Chen via cfe-commits
@@ -8261,12 +8261,19 @@ def CoroAwaitElidableDoc : Documentation { The ``[[clang::coro_await_elidable]]`` is a class attribute which can be applied to a coroutine return type. -When a coroutine function that returns such a type calls another coroutine function, -the compiler

[clang] Implementing `asfloat` using `bit_cast` (PR #108686)

2024-09-16 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -verify + + +float4 test_float_too_many_arg(float p0, float p1) { + return asfloat(p0, p1); + // expected-error@-1 {{no matching function for call to 'asfl

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox created https://github.com/llvm/llvm-project/pull/108866 The last attempt failed - https://github.com/llvm/llvm-project/pull/108187#issuecomment-2353122096 so was reverted - #108838 Not quite sure how to build targets available, so I run the same `cmake` and the `ni

[clang] Implementing `asfloat` using `bit_cast` (PR #108686)

2024-09-16 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/108686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox edited https://github.com/llvm/llvm-project/pull/108866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-16 Thread Tex Riddell via cfe-commits
tex3d wrote: Abandoning this PR in favor of a better sequence of steps starting with #108865. https://github.com/llvm/llvm-project/pull/107923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [clang][hlsl] Add atan2 intrinsic part 1 (PR #107923)

2024-09-16 Thread Tex Riddell via cfe-commits
https://github.com/tex3d closed https://github.com/llvm/llvm-project/pull/107923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/106782 >From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 30 Aug 2024 12:08:37 -0700 Subject: [PATCH 1/6] add diag and testing for space and global constants ---

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 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 08efa23083606dc0248c4a7dee7087fa96b29c04 57b1dabf3522eae47fd7f8ea26c12bf1a97819ab --e

[clang] [Clang] Propagate elide safe context through [[clang::coro_must_await]] (PR #108474)

2024-09-16 Thread Yuxuan Chen via cfe-commits
@@ -880,14 +898,12 @@ ExprResult Sema::BuildUnresolvedCoawaitExpr(SourceLocation Loc, Expr *Operand, } auto *RD = Promise->getType()->getAsCXXRecordDecl(); - bool AwaitElidable = - isCoroAwaitElidableCall(Operand) && - isAttributedCoroAwaitElidable( -

[clang] [Clang] Do not perform integral promotion if operands of expression `x ? : y` have the same type (PR #108837)

2024-09-16 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s shafik wrote: I think this test should go in `clang/test/Sema/conditional-expr.c` and we should add a section of the GNU extension there. I am also a bit concerned that we don't have a spe

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-16 Thread Artem Belevich via cfe-commits
Artem-B wrote: The description of the flat address space in the `TargetTransformInfo.h` is somewhat vague and both, soo specific and not precise enough, IMO: ``` The flat address space is a /// generic address space that can be used access multiple segments of memory /// with different addre

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox edited https://github.com/llvm/llvm-project/pull/108866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Add missing space in -Wunsafe-buffer-usage documentation (PR #107905)

2024-09-16 Thread Louis Dionne via cfe-commits
ldionne wrote: I don't think this is very controversial so I'll land now that the CI has run. https://github.com/llvm/llvm-project/pull/107905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [clang][NFC] Add missing space in -Wunsafe-buffer-usage documentation (PR #107905)

2024-09-16 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/107905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 83bb731 - [clang][NFC] Add missing space in -Wunsafe-buffer-usage documentation (#107905)

2024-09-16 Thread via cfe-commits
Author: Louis Dionne Date: 2024-09-16T14:12:34-04:00 New Revision: 83bb7318cad150608d5579aa9fbfd7e8d600e5c5 URL: https://github.com/llvm/llvm-project/commit/83bb7318cad150608d5579aa9fbfd7e8d600e5c5 DIFF: https://github.com/llvm/llvm-project/commit/83bb7318cad150608d5579aa9fbfd7e8d600e5c5.diff

[clang] [clang-tools-extra] [flang] Fix OOM in FormatDiagnostic (2nd attempt) (PR #108866)

2024-09-16 Thread Vakhurin Sergei via cfe-commits
https://github.com/igelbox edited https://github.com/llvm/llvm-project/pull/108866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 04d71ea - [Format] Dont treat LBrace after extends/implements as initializer list (#108524)

2024-09-16 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-09-16T20:18:39+02:00 New Revision: 04d71ea11ba84d989faed4572ee54265386851f6 URL: https://github.com/llvm/llvm-project/commit/04d71ea11ba84d989faed4572ee54265386851f6 DIFF: https://github.com/llvm/llvm-project/commit/04d71ea11ba84d989faed4572ee54265386851f6.dif

[clang] [Format] Dont treat LBrace after extends/implements as initializer list (PR #108524)

2024-09-16 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet closed https://github.com/llvm/llvm-project/pull/108524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/106782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. I'm marking this as approved - I think that there's some cleanup and rearranging of the tests here that would improve this change. It might be worth trying to get a review with someone who has more experience of testing strategies for thes

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,66 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// valid +cbuffer cbuf { +RWBuffer r : register(u0, space0); +} + +cbuffer cbuf2 { +struct x { +// this test validates that no diagnostic is emitte

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,66 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify damyanp wrote: This file seems to now mostly be testing non-error cases of specifying a space for registers. I think it'd probably be better to ju

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-16 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/106782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >