[clang] [llvm] [RISCV] Add Smrnmi extension (PR #111668)

2024-10-23 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/111668 >From c7a9b55023bc1910e1d2e0383dfab0314f525213 Mon Sep 17 00:00:00 2001 From: dong-miao <65881865+dong-m...@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:49:38 +0800 Subject: [PATCH 01/25] Update RISCVSyst

[clang] b8fddca - [llvm] Support llvm::Any across shared libraries on windows (#108051)

2024-10-23 Thread via cfe-commits
Author: Thomas Fransham Date: 2024-10-24T08:07:13+03:00 New Revision: b8fddca7bdb354d51e340c60aafe3dff1b35a195 URL: https://github.com/llvm/llvm-project/commit/b8fddca7bdb354d51e340c60aafe3dff1b35a195 DIFF: https://github.com/llvm/llvm-project/commit/b8fddca7bdb354d51e340c60aafe3dff1b35a195.dif

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE (PR #113532)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Phoebe Wang (phoebewang) Changes Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 --- Patch is 184.18 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/113532.diff 57 Files Affected: -

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE (PR #113532)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-tablegen Author: Phoebe Wang (phoebewang) Changes Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 --- Patch is 184.18 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/113532.diff 57 Files Affected: -

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE (PR #113532)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Phoebe Wang (phoebewang) Changes Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368 --- Patch is 184.18 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/113

[clang] [Driver] Remove ignored Flag form of -fauto-profile/-fprofile-sample-use (PR #113528)

2024-10-23 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/113528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix working -assume-filename with .clang-format-ignore (PR #113100)

2024-10-23 Thread Owen Pan via cfe-commits
@@ -46,5 +46,16 @@ // CHECK5-NEXT: {{Formatting \[4/5] .*foo\.c}} // CHECK5-NOT: foo.js +// RUN: echo "foo.*" > .clang-format-ignore +// RUN: touch foo.c +// RUN: echo foo | clang-format -assume-filename=foo.c 2>&1 \ +// RUN: | FileCheck %s -check-prefix=CHECK6 -allow-empty

[clang] [clang-format] Fix working -assume-filename with .clang-format-ignore (PR #113100)

2024-10-23 Thread Owen Pan via cfe-commits
@@ -46,5 +46,16 @@ // CHECK5-NEXT: {{Formatting \[4/5] .*foo\.c}} // CHECK5-NOT: foo.js +// RUN: echo "foo.*" > .clang-format-ignore +// RUN: touch foo.c +// RUN: echo foo | clang-format -assume-filename=foo.c 2>&1 \ owenca wrote: ```suggestion // RUN: echo "

[clang] [clang-format] Fix working -assume-filename with .clang-format-ignore (PR #113100)

2024-10-23 Thread Owen Pan via cfe-commits
@@ -707,8 +707,11 @@ int main(int argc, const char **argv) { errs() << "Clang-formatting " << LineNo << " files\n"; } - if (FileNames.empty()) + if (FileNames.empty()) { +if (!AssumeFileName.empty() && isIgnored(AssumeFileName)) owenca wrote: ```s

[clang] [clang-format] Fix working -assume-filename with .clang-format-ignore (PR #113100)

2024-10-23 Thread Owen Pan via cfe-commits
@@ -46,5 +46,16 @@ // CHECK5-NEXT: {{Formatting \[4/5] .*foo\.c}} // CHECK5-NOT: foo.js +// RUN: echo "foo.*" > .clang-format-ignore +// RUN: touch foo.c +// RUN: echo foo | clang-format -assume-filename=foo.c 2>&1 \ +// RUN: | FileCheck %s -check-prefix=CHECK6 -allow-empty

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

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -2074,6 +2083,19 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_elementwise_splitdouble: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; + +if (Che

[clang] d1fae59 - [clang-tidy] Fix build error (NFC)

2024-10-23 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-10-24T14:01:25+08:00 New Revision: d1fae5996e66c2a9f0b1c5b9776f86962ab8e9ea URL: https://github.com/llvm/llvm-project/commit/d1fae5996e66c2a9f0b1c5b9776f86962ab8e9ea DIFF: https://github.com/llvm/llvm-project/commit/d1fae5996e66c2a9f0b1c5b9776f86962ab8e9ea.diff LOG: [

[clang] [HLSL][SPIRV] Add convergence tokens to entry point wrapper (PR #112757)

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

[clang] [HLSL][SPIRV] Add convergence tokens to entry point wrapper (PR #112757)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -triple spirv-pc-vulkan-compute -finclude-default-header -fnative-half-type -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s farzonl wrote: This test doesn't do anything with `native half types why do you need the `-fn

[clang] [llvm] [RISCV] Add Smrnmi extension (PR #111668)

2024-10-23 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/111668 >From c7a9b55023bc1910e1d2e0383dfab0314f525213 Mon Sep 17 00:00:00 2001 From: dong-miao <65881865+dong-m...@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:49:38 +0800 Subject: [PATCH 01/24] Update RISCVSyst

[clang] [HLSL][SPIRV] Add convergence tokens to entry point wrapper (PR #112757)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. Code looks correct. Issues found were minor so LGTM. https://github.com/llvm/llvm-project/pull/112757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/113477 ___ 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-10-23 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,188 @@ +//===--- 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] [compiler-rt] [llvm] [X86] Support MOVRS and AVX10.2 instructions. (PR #113274)

2024-10-23 Thread Freddy Ye via cfe-commits
@@ -261,6 +261,7 @@ X86_FEATURE_COMPAT(AVX10_1, "avx10.1-256", 36) X86_FEATURE_COMPAT(AVX10_1_512, "avx10.1-512", 37) X86_FEATURE_COMPAT(AVX10_2, "avx10.2-256",0) X86_FEATURE_COMPAT(AVX10_2_512, "avx10.2-512",

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

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -4867,12 +4946,13 @@ Action *Driver::ConstructPhaseAction( return C.MakeAction(Input, Output); } if (Args.hasArg(options::OPT_emit_llvm) || -(((Input->getOffloadingToolChain() && - Input->getOffloadingToolChain()->getTriple().isAMDGPU()) || -

[clang] [compiler-rt] [llvm] [X86] Support MOVRS and AVX10.2 instructions. (PR #113274)

2024-10-23 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,174 @@ +/*===-- movrs_avx10_2intrin.h - AVX512MOVRS intrinsics -=== FreddyLeaf wrote: [567131c](https://github.com/llvm/llvm-project/pull/113274/commits/567131c8c265bd29dede1ad76dd1c52a4077b270) https://github.com/llvm/llvm-project

[clang] [compiler-rt] [llvm] [X86] Support MOVRS and AVX10.2 instructions. (PR #113274)

2024-10-23 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/113274 >From 19c6400ac7127860ac1712941acbd1585614d17d Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Mon, 21 Oct 2024 10:24:14 +0800 Subject: [PATCH 1/4] [X86] Support MOVRS and AVX10.2 instructions. Ref.: https://

[clang] [compiler-rt] [llvm] [X86] Support MOVRS and AVX10.2 instructions. (PR #113274)

2024-10-23 Thread Freddy Ye via cfe-commits
@@ -0,0 +1,98 @@ +/*=== movrs_avx10_2_512intrin.h - AVX512MOVRS intrinsics ---=== FreddyLeaf wrote: [567131c](https://github.com/llvm/llvm-project/pull/113274/commits/567131c8c265bd29dede1ad76dd1c52a4077b270) https://github.com/llvm/llvm-project/

[clang] [compiler-rt] [llvm] [X86] Support MOVRS and AVX10.2 instructions. (PR #113274)

2024-10-23 Thread Freddy Ye via cfe-commits
@@ -7572,3 +7572,42 @@ def int_x86_avx10_vfnmsub231nepbf16128 : ClangBuiltin<"__builtin_ia32_vfnmsub231 DefaultAttrsIntrinsic<[llvm_v8bf16_ty], [llvm_v8bf16_ty, llvm_v8bf16_ty, llvm_v8bf16_ty ], [IntrNoMem]>; } + +let TargetPrefix = "x86"

[clang] [HLSL][SPIRV] Add convergence tokens to entry point wrapper (PR #112757)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -469,14 +479,22 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { for (auto &F : M.functions()) { if (!F.hasFnAttribute("hlsl.shader")) continue; -IRBuilder<> B(&F.getEntryBlock(), F.getEntryBlock().begin()); +auto *Token = getConvergenceToken(F.getE

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

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -217,10 +217,11 @@ static bool ActionFailed(const Action *A, if (FailingCommands.empty()) return false; - // CUDA/HIP can have the same input source code compiled multiple times so do - // not compiled again if there are already failures. It is OK to abort the - //

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

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -582,6 +582,10 @@ class Driver { /// @name Helper Methods /// @{ + /// MakeSYCLDeviceTriple - Returns the SYCL device triple for the + /// specified ArchType. + llvm::Triple MakeSYCLDeviceTriple(StringRef TargetArch = "spir64") const; bader wrote:

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

2024-10-23 Thread Alexey Bader via cfe-commits
@@ -1073,6 +1074,8 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, getToolChain().AddCudaIncludeArgs(Args, CmdArgs); if (JA.isOffloading(Action::OFK_HIP)) getToolChain().AddHIPIncludeArgs(Args, CmdArgs); + if (JA.isOffloading(Action::OFK_

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

2024-10-23 Thread Alexey Bader via cfe-commits
https://github.com/bader commented: @mdtoguchi, thank you for working on this! Overall, looks good to me, but I made a few suggestions in the comments. It would be great if @tahonermann and @AaronBallman can confirm that all their comments are addressed. https://github.com/llvm/llvm-project/pul

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-23 Thread via cfe-commits
cor3ntin wrote: I am waiting for Hubert as I don't trust my knowledge of floating points to offer meaningful feedback here, sorry https://github.com/llvm/llvm-project/pull/113020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [llvm] [llvm] Support llvm::Any across shared libraries on windows (PR #108051)

2024-10-23 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/108051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl 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] [clang-format] Add TemplateNames option to help parse C++ angles (PR #109916)

2024-10-23 Thread Owen Pan via cfe-commits
@@ -5230,6 +5239,7 @@ struct FormatStyle { TableGenBreakingDAGArgOperators == R.TableGenBreakingDAGArgOperators && TableGenBreakInsideDAGArg == R.TableGenBreakInsideDAGArg && + TabWidth == R.TabWidth && TemplateNames == R.TemplateN

[clang] [clang-format] Add KeepFormFeed option (PR #113268)

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

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

2024-10-23 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. 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] [clang-format] Add KeepFormFeed option (PR #113268)

2024-10-23 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/113268 ___ 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-23 Thread Sarah Spall via cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/111082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 786db63 - [clang-format] Add KeepFormFeed option (#113268)

2024-10-23 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-23T19:55:32-07:00 New Revision: 786db636b9b6967087685a62af665046621b4957 URL: https://github.com/llvm/llvm-project/commit/786db636b9b6967087685a62af665046621b4957 DIFF: https://github.com/llvm/llvm-project/commit/786db636b9b6967087685a62af665046621b4957.diff LOG:

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-23 Thread Peilin Ye via cfe-commits
peilin-ye wrote: @yonghong-song, back to your example: > ``` > $ cat t4.c > short foo(short *ptr) { > return __atomic_load_n(ptr, __ATOMIC_ACQUIRE); > } > ``` > ``` > : >0: e9 10 00 00 00 00 00 00 w0 = load_acquire((u16 *)(r1 + 0x0)) >1: 95 00 00 00

[clang] [C++20][Modules] Quote header unit name in preprocessor output (-E) (PR #112883)

2024-10-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Quote header unit name in preprocessor output (-E) (PR #112883)

2024-10-23 Thread Chuanqi Xu via cfe-commits
@@ -952,13 +952,15 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok, continue; } else if (Tok.is(tok::annot_header_unit)) { // This is a header-name that has been (effectively) converted into a - // module-name. + // module-name, pr

[clang] [C++20][Modules] Quote header unit name in preprocessor output (-E) (PR #112883)

2024-10-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/112883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple spirv-vulkan-library %s -fnative-half-type -emit-ll

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

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple spirv-vulkan-library %s -fnative-half-type -emit-ll

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-10-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'd like some answer about how we plan to ensure the macros remain correct. Short-term, "someone periodically runs the tool manually" might be good enough if we don't expect much churn, I guess. Also, can the tool itself be added to llvm-project? (The actual changes seem

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,70 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s + +// NOTE: The number in type name and whether the struct is packed or not will mostly +// likely change once subscript oper

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

2024-10-23 Thread Tex Riddell via cfe-commits
@@ -95,6 +99,133 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-10-23 Thread Eli Friedman via cfe-commits
@@ -80,13 +80,47 @@ ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { ? CSR_ATPCS_SplitPush_SwiftTail_SaveList : CSR_AAPCS_SwiftTail_SaveList); } else if (F.hasFnAttribute(

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2024-10-23 Thread Eli Friedman via cfe-commits
@@ -5584,6 +5584,20 @@ static void handleAbiTagAttr(Sema &S, Decl *D, const ParsedAttr &AL) { AbiTagAttr(S.Context, AL, Tags.data(), Tags.size())); } +static void handleARMInterruptSaveFPAttr(Sema &S, Decl *D, + const P

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

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

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-10-23 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 33363521ca24f912cc25530f6cecbca53acce8a3 4a18bbc256051f30805620f65a4db037ea2fe96c --e

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

2024-10-23 Thread via cfe-commits
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); +

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-10-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/113509 This removes the temporary ban on mixing AMDGCN flavoured SPIR-V and concrete targets (e.g. `gfx900`) in the same HIPAMD compilation. This is done primarily by tweaking the effective / observable triple when th

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

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl 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] Adding splitdouble HLSL function (PR #109331)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple spirv-vulkan-library %s -fnative-half-type -emit-ll

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-23 Thread via cfe-commits
@@ -53,6 +53,8 @@ class PGOInstrumentationGenCreateVar bool ProfileSampling; }; +enum class InstrColdFuncCovMode { Conservative = 0, Optimistic }; WenleiHe wrote: remove this? https://github.com/llvm/llvm-project/pull/109837 __

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-23 Thread via cfe-commits
https://github.com/WenleiHe approved this pull request. Looks good enough to me with the FIXME :) Thanks! https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-23 Thread via cfe-commits
https://github.com/WenleiHe edited https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Initial implementation of P2719 (PR #113510)

2024-10-23 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 2deb3a26fa47a4640962489e5473726d7a8bf12b 2da55a9d9db62e80cddd83f86e26d31537e571b5 --e

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-23 Thread Eli Friedman via cfe-commits
@@ -899,6 +899,11 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (CodeGenOpts.PointerAuth.IndirectGotos) Fn->addFnAttr("ptrauth-indirect-gotos"); + // Add return control flow integrity attributes for RISCV. + if (CodeGenOpts.CFProtectionRetur

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

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,107 @@ +; 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 %} + +; CHECK: OpMemoryModel Logical GLSL450 + +define noundef i32 @f

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-10-23 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/113509 >From 4a18bbc256051f30805620f65a4db037ea2fe96c Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 24 Oct 2024 01:14:28 +0100 Subject: [PATCH 1/2] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s.

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Alex Voicu (AlexVlx) Changes This removes the temporary ban on mixing AMDGCN flavoured SPIR-V and concrete targets (e.g. `gfx900`) in the same HIPAMD compilation. This is done primarily by tweaking the effective / observable triple

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-10-23 Thread Dan Liew via cfe-commits
@@ -13559,6 +13562,27 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, QualType LHSType = LHSExpr->getType(); QualType RHSType = CompoundType.isNull() ? RHS.get()->getType() : CompoundType; + + if (RHS.

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,130 @@ +; 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: What is the reason for having a

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -1,133 +1,143 @@ // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \ // RUN: -fnative-half-type -emit-llvm -disable-llvm-passes -o - | \ -// RUN: FileCheck %s --check-prefixes=CHECK,NATIVE_HALF +// RUN: FileCheck %s --check-prefixes=CHE

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

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

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

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

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
@@ -4,21 +4,30 @@ // NOTE: SPIRV codegen for resource types is not yet implemented StructuredBuffer Buf : register(t10); +RWStructuredBuffer Buf2 : register(u5, space1); // CHECK: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer", float, 0, 0), float } +// CHE

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

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

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-10-23 Thread Peilin Ye via cfe-commits
peilin-ye wrote: @yonghong-song Hi Yonghong, about my earlier question: > However, I wonder how do I generate a sign-extending (sext), acquiring > ATOMIC_LOAD in SelectionDAG? After more digging, I found this in `llvm/include/llvm/CodeGen/TargetLowering.h`: ```cpp /// Returns how the platf

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -2559,6 +2559,12 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, } break; case Intrinsic::spv_saturate: return selectSaturate(ResVReg, ResType, I); + case Intrinsic::spv_fclamp: +return selectExtInst(ResVReg, ResType, I, CL::fclamp, GL::FCla

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

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

[clang-tools-extra] d8ef7b6 - [clang-tidy] Stop linking against clangSema (#113373)

2024-10-23 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-10-23T20:37:38+04:00 New Revision: d8ef7b67e84145275682185905fcdfd938fe08ce URL: https://github.com/llvm/llvm-project/commit/d8ef7b67e84145275682185905fcdfd938fe08ce DIFF: https://github.com/llvm/llvm-project/commit/d8ef7b67e84145275682185905fcdfd938fe08ce.

[clang] [Clang] [Draft] Implement P0588R1 capture rules (PR #105953)

2024-10-23 Thread Yupei Liu via cfe-commits
LYP951018 wrote: Thanks for the review comments. Sorry for the delayed response, I'm a little busy recently. I'm still fixing a clang-tidy unit test broken by this change. I'll take a deep dive into your suggestions a bit later ;) https://github.com/llvm/llvm-project/pull/105953 __

[clang] [HLSL] Change StructuredBuffer resource class to SRV (PR #113397)

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

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -18661,14 +18661,30 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *OpMax = EmitScalarExpr(E->getArg(2)); QualType Ty = E->getArg(0)->getType(); -bool IsUnsigned = false; if (auto *VecTy = Ty->getAs()) Ty = VecTy->getElemen

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-23 Thread David Olsen via cfe-commits
@@ -16,4 +16,50 @@ include "clang/CIR/Dialect/IR/CIRDialect.td" +include "mlir/Interfaces/ControlFlowInterfaces.td" +include "mlir/Interfaces/FunctionInterfaces.td" +include "mlir/Interfaces/InferTypeOpInterface.td" +include "mlir/Interfaces/LoopLikeInterface.td" +include "ml

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-23 Thread Farzon Lotfi via cfe-commits
@@ -18661,14 +18661,30 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *OpMax = EmitScalarExpr(E->getArg(2)); QualType Ty = E->getArg(0)->getType(); -bool IsUnsigned = false; if (auto *VecTy = Ty->getAs()) Ty = VecTy->getElemen

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-23 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi created https://github.com/llvm/llvm-project/pull/113483 Finish hooking up ClangIR code gen into the Clang control flow, initializing enough that basic code gen is possible. Add an almost empty `cir.func` op to the ClangIR dialect. Currently the only property o

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-23 Thread Eli Friedman via cfe-commits
@@ -2259,6 +2259,17 @@ QualType Sema::BuildArrayType(QualType T, ArraySizeModifier ASM, isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange(); +

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113477 >From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 23 Oct 2024 10:29:44 -0700 Subject: [PATCH 1/5] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaS

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vigneshwar Jayakumar (VigneshwarJ) Changes Added diagnosis to throw error when zero sized arrays are used in the HIP device code. SWDEV-449592 --- Full diff: https://github.com/llvm/llvm-project/pull/113470.diff 3 Files Affected: - (mo

[clang-tools-extra] [clang-tidy] Stop linking against clangSema (PR #113373)

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

[clang] [CLANG][AArch64]Add Neon vectors for mfloat8_t (PR #99865)

2024-10-23 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > @kazutakahirata Please ping here if this persists after > [3309061](https://github.com/llvm/llvm-project/commit/3309061b2dd8a5cacacf05d956a872617808a974). > Thanks @SpencerAbson Your patch indeed fixes the build. Thank you for fixing this quickly! https://github.com/

[clang] [flang] [flang] Support -mabi=vec-extabi and -mabi=vec-default on AIX (PR #113215)

2024-10-23 Thread Kelvin Li via cfe-commits
@@ -203,6 +203,30 @@ void Flang::AddAArch64TargetArgs(const ArgList &Args, } } +void Flang::AddPPCTargetArgs(const ArgList &Args, + ArgStringList &CmdArgs) const { + bool VecExtabi = false; + for (const Arg *A : Args.filtered(options::OPT_mabi_E

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-10-23 Thread Peter Klausler via cfe-commits
https://github.com/klausler converted_to_draft https://github.com/llvm/llvm-project/pull/113504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Provide default value for -fprofile-sample-use, -fprofile-auto (PR #112750)

2024-10-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: Actually I think we should drop the accepted and ignored `Flag` form of `-fprofile-sample-use` and `-fprofile-auto`, which is misleading at the least. I have a pending patch, which I will upload at night. https://github.com/llvm/llvm-project/pull/112750 _

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-semantics Author: Peter Klausler (klausler) Changes Implement the UNSIGNED extension type and operations under control of a language feature flag (-funsigned). This is nearly identical to the UNSIGNED feature that has been available in Sun Fortr

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-10-23 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/110471 >From 95cd675d3c8f418ccd1151380991952d53df7479 Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Thu, 26 Sep 2024 16:24:59 +0200 Subject: [PATCH] [clang-tidy] [analyzer] Move nondeterministic pointer usage

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-23 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping @cor3ntin since he mentioned on Discord that he's available for reviews this week :) https://github.com/llvm/llvm-project/pull/113020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-10-23 Thread Timm Baeder via cfe-commits
@@ -2259,6 +2259,17 @@ QualType Sema::BuildArrayType(QualType T, ArraySizeModifier ASM, isSFINAEContext() ? diag::err_typecheck_zero_array_size : diag::ext_typecheck_zero_array_size) << 0 << ArraySize->getSourceRange(); +

[clang] [clang codegen] Add CreateRuntimeFunction overload that takes a clang type. (PR #113506)

2024-10-23 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/113506 >From bb58bdd524ea751d598fe8d4954be91f88279b21 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 23 Oct 2024 16:12:27 -0700 Subject: [PATCH] [clang codegen] Add CreateRuntimeFunction overload that tak

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113477 >From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 23 Oct 2024 10:29:44 -0700 Subject: [PATCH 1/4] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaS

[clang] [llvm] [Clang] Fix argument extensions in CGBlocks.cpp (PR #111740)

2024-10-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I looked to see how hard it would be to lower the clang type... seems like it's not hard. Pushed #113506. Let me know what you think. If there's some complication I'm not seeing, I think your suggested API in the current version of this patch makes sense... but using cla

[clang] [flang] [flang] Add UNSIGNED (PR #113504)

2024-10-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Peter Klausler (klausler) Changes Implement the UNSIGNED extension type and operations under control of a language feature flag (-funsigned). This is nearly identical to the UNSIGNED feature that has been available in Sun Fortran

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

2024-10-23 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl 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] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113477 >From 106ea44e1f8833f26364c54cc3fbf2fb57665be6 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Wed, 23 Oct 2024 10:29:44 -0700 Subject: [PATCH 1/3] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaS

[clang] [HLSL] Add RWStructuredBuffer definition to HLSLExternalSemaSource (PR #113477)

2024-10-23 Thread Damyan Pepper via cfe-commits
@@ -4,21 +4,30 @@ // NOTE: SPIRV codegen for resource types is not yet implemented StructuredBuffer Buf : register(t10); +RWStructuredBuffer Buf2 : register(u5, space1); // CHECK: %"class.hlsl::StructuredBuffer" = type { target("dx.RawBuffer", float, 0, 0), float } +// CHE

  1   2   3   4   >