[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-20 Thread Shilei Tian via cfe-commits
@@ -1431,7 +1431,7 @@ def int_amdgcn_make_buffer_rsrc : DefaultAttrsIntrinsic < [llvm_anyptr_ty], [llvm_anyptr_ty, // base llvm_i16_ty,// stride (and swizzle control) - llvm_i32_ty,// NumRecords / extent + llvm_i64_ty,// NumRecords / extent --

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-19 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-19 Thread Shilei Tian via cfe-commits
@@ -11602,29 +11602,48 @@ SDValue SITargetLowering::lowerPointerAsRsrcIntrin(SDNode *Op, SDValue NumRecords = Op->getOperand(3); SDValue Flags = Op->getOperand(4); - auto [LowHalf, HighHalf] = DAG.SplitScalar(Pointer, Loc, MVT::i32, MVT::i32); - SDValue Mask = DAG.getCo

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-19 Thread Shilei Tian via cfe-commits
@@ -1431,7 +1431,7 @@ def int_amdgcn_make_buffer_rsrc : DefaultAttrsIntrinsic < [llvm_anyptr_ty], [llvm_anyptr_ty, // base llvm_i16_ty,// stride (and swizzle control) - llvm_i32_ty,// NumRecords / extent + llvm_i64_ty,// NumRecords / extent --

[clang] [llvm] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-19 Thread Shilei Tian via cfe-commits
@@ -5905,33 +5905,64 @@ bool AMDGPULegalizerInfo::legalizePointerAsRsrcIntrin( Register Flags = MI.getOperand(5).getReg(); LLT S32 = LLT::scalar(32); + LLT S64 = LLT::scalar(64); B.setInsertPt(B.getMBB(), ++B.getInsertPt()); - auto Unmerge = B.buildUnmerge(S32, Poin

[clang] [llvm] [AMDGPU] Change `scale_sel` to be 4 bits (PR #157900)

2025-09-19 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/157900 >From d7ea946ada63b8ff0a29cc33721ebbd7d5765dec Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 10 Sep 2025 12:56:57 -0400 Subject: [PATCH] [AMDGPU] Change `scale_sel` to be 4 bits The latest SP changes u

[clang] [AMDGPU] Add sema check for global_atomic_fadd_v2f16 builtin (PR #158145)

2025-09-18 Thread Shilei Tian via cfe-commits
shiltian wrote: no test? https://github.com/llvm/llvm-project/pull/158145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add gfx1251 subtarget (PR #159430)

2025-09-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/159430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add sema check for global_atomic_fadd_v2f16 builtin (PR #158145)

2025-09-17 Thread Shilei Tian via cfe-commits
shiltian wrote: I'm not sure what this PR is trying to fix, but we do have type enforcement in `clang/include/clang/Basic/BuiltinsAMDGPU.def`? https://github.com/llvm/llvm-project/pull/158145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [AMDGPU] Change `scale_sel` to be 4 bits (PR #157900)

2025-09-16 Thread Shilei Tian via cfe-commits
shiltian wrote: @rampitec SP3 has been updated. https://github.com/llvm/llvm-project/pull/157900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-15 Thread Shilei Tian via cfe-commits
@@ -1562,6 +1562,23 @@ def HIPManaged : InheritableAttr { let Documentation = [HIPManagedAttrDocs]; } +def CUDAClusterDims : InheritableAttr { + let Spellings = [GNU<"cluster_dims">, Declspec<"__cluster_dims__">]; + let Args = [ExprArgument<"X">, ExprArgument<"Y", 1>, Expr

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-13 Thread Shilei Tian via cfe-commits
@@ -7532,6 +7532,25 @@ A managed variable can be accessed in both device and host code. }]; } +def CUDAClusterDimsAttrDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +In CUDA/HIP programming, the ``__cluster_dims__`` attribute can be applied to a ke

[clang] [flang] [llvm] [OpenMP] Introduce the initial support for OpenMP kernel language (PR #66844)

2025-09-13 Thread Shilei Tian via cfe-commits
@@ -843,7 +857,8 @@ void CGOpenMPRuntimeGPU::emitTargetOutlinedFunction( assert(!ParentName.empty() && "Invalid target region parent name!"); bool Mode = supportsSPMDExecutionMode(CGM.getContext(), D); - if (Mode) + bool IsBareKernel = D.getSingleClause(); + if (Mode ||

[clang] [llvm] [AMDGPU] Add builtins and intrinsics for cluster attributes (PR #157877)

2025-09-13 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#157877** https://app.graphite.dev/github/pr/llvm/llvm-project/157877?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/157

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-12 Thread Shilei Tian via cfe-commits
@@ -5654,6 +5654,130 @@ static void handleLaunchBoundsAttr(Sema &S, Decl *D, const ParsedAttr &AL) { AL.getNumArgs() > 2 ? AL.getArgAsExpr(2) : nullptr); } +static std::pair +makeClusterDimsArgExpr(Sema &S, Expr *E, const CUDAClusterDimsAttr &AL, +

[clang] [llvm] [AMDGPU] Add builtins and intrinsics for cluster attributes (PR #157877)

2025-09-12 Thread Shilei Tian via cfe-commits
shiltian wrote: > Any tests for intrinsics? Do you mean the lowering of the intrinsics? https://github.com/llvm/llvm-project/pull/157877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/156686 >From 714faa21598f83a2076d546cf1ad81d913a3862a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 3 Sep 2025 10:47:52 -0400 Subject: [PATCH 1/3] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-12 Thread Shilei Tian via cfe-commits
@@ -7532,6 +7532,25 @@ A managed variable can be accessed in both device and host code. }]; } +def CUDAClusterDimsAttrDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +In CUDA/HIP programming, the ``__cluster_dims__`` attribute can be applied to a ke

[clang] [llvm] [AMDGPU] Add builtins and intrinsics for cluster attributes (PR #157877)

2025-09-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/157877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Change `scale_sel` to be 4 bits (PR #157900)

2025-09-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian ready_for_review https://github.com/llvm/llvm-project/pull/157900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add builtins and intrinsics for cluster attributes (PR #157877)

2025-09-12 Thread Shilei Tian via cfe-commits
shiltian wrote: That will be in a follow-up PR. https://github.com/llvm/llvm-project/pull/157877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-12 Thread Shilei Tian via cfe-commits
@@ -7532,6 +7532,25 @@ A managed variable can be accessed in both device and host code. }]; } +def CUDAClusterDimsAttrDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +In CUDA/HIP programming, the ``__cluster_dims__`` attribute can be applied to a ke

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-12 Thread Shilei Tian via cfe-commits
@@ -1557,6 +1557,23 @@ def HIPManaged : InheritableAttr { let Documentation = [HIPManagedAttrDocs]; } +def CUDAClusterDims : InheritableAttr { + let Spellings = [GNU<"cluster_dims">, Declspec<"__cluster_dims__">]; shiltian wrote: This is to follow all exis

[clang] [llvm] [AMDGPU] Add builtins and intrinsics for cluster attributes (PR #157877)

2025-09-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/157877 Co-authored-by: Ivan Kosarev >From 0255f4e61cf3c98e167c29c5fd5aa9ddfb9f1f54 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 10 Sep 2025 11:23:18 -0400 Subject: [PATCH] [AMDGPU] Add builtins and intrinsi

[clang] [HIP][Clang] Remove __AMDGCN_WAVEFRONT_SIZE macros (PR #157463)

2025-09-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/157463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Unittest] Support for `target` update directive and `from` clause in clang unittests (PR #150580)

2025-09-05 Thread Shilei Tian via cfe-commits
@@ -4734,6 +4734,65 @@ void x() { EXPECT_TRUE(matchesWithOpenMP(Source8, Matcher)); } +TEST_P(ASTMatchersTest, OMPTargetUpdateDirective_IsStandaloneDirective) { + auto Matcher = ompTargetUpdateDirective(isStandaloneDirective()); + + StringRef Source0 = R"( +void foo()

[clang] [Clang][OpenMP]Default clause variable category (PR #157063)

2025-09-05 Thread Shilei Tian via cfe-commits
@@ -20,6 +20,27 @@ using namespace clang; using namespace llvm::omp; +unsigned clang::getOpenMPDefaultVariableCategory(StringRef Str, + const LangOptions &LangOpts) { + unsigned VC = llvm::StringSwitch(Str) +#define OPENMP_DEFAU

[clang] [Clang][OpenMP]Default clause variable category (PR #157063)

2025-09-05 Thread Shilei Tian via cfe-commits
@@ -257,6 +264,10 @@ struct OMPInteropInfo final { llvm::SmallVector PreferTypes; }; +unsigned getOpenMPDefaultVariableCategory(StringRef Str, + const LangOptions &LangOpts); +const char *getOpenMPDefaultVariableCategoryName(unsigned

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-04 Thread Shilei Tian via cfe-commits
@@ -7532,6 +7532,25 @@ A managed variable can be accessed in both device and host code. }]; } +def CUDAClusterDimsAttrDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +In CUDA/HIP programming, the ``__cluster_dims__`` attribute can be applied to a ke

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-04 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/156686 >From 2a30ef5a778fd4aee5ef5f10066ed3bda317e9d1 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 3 Sep 2025 10:47:52 -0400 Subject: [PATCH 1/2] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__

[clang] [Clang][Unittest] Support for `target` update directive and `from` clause in clang unittests (PR #150580)

2025-09-04 Thread Shilei Tian via cfe-commits
@@ -2742,6 +2742,32 @@ void x() { EXPECT_TRUE(notMatchesWithOpenMP(Source2, Matcher)); } +TEST(ASTMatchersTestOpenMP, OMPTargetUpdateDirective) { + auto Matcher = stmt(ompTargetUpdateDirective()); + + StringRef Source0 = R"( +void foo() { + int arr[8]; + #pra

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-04 Thread Shilei Tian via cfe-commits
@@ -7532,6 +7532,25 @@ A managed variable can be accessed in both device and host code. }]; } +def CUDAClusterDimsAttrDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +In CUDA/HIP programming, the ``__cluster_dims__`` attribute can be applied to a ke

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-03 Thread Shilei Tian via cfe-commits
shiltian wrote: > It isn't clear what these are, why/whether we want them, what their signature > is, etc. It is the support for [`__cluster_dims__` attribute](https://docs.nvidia.com/cuda/cuda-c-programming-guide/#thread-block-clusters). > Additionally, we do not allow adding undocumented at

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/156686 >From 190dd7af733563bdb99ec5d4812226b86448f273 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 3 Sep 2025 10:47:52 -0400 Subject: [PATCH] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` at

[clang] d25d830 - [NFC] Remove trailing whitespaces from two files

2025-09-03 Thread Shilei Tian via cfe-commits
Author: Shilei Tian Date: 2025-09-03T10:51:08-04:00 New Revision: d25d8309d173f81bc26babf9964d4d021b76a4af URL: https://github.com/llvm/llvm-project/commit/d25d8309d173f81bc26babf9964d4d021b76a4af DIFF: https://github.com/llvm/llvm-project/commit/d25d8309d173f81bc26babf9964d4d021b76a4af.diff L

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-03 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#156686** https://app.graphite.dev/github/pr/llvm/llvm-project/156686?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/156

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/156686 This PR adds basic frontend support for `__cluster_dims__` and `__no_cluster__` attribute. Co-authored-by: Yaxun (Sam) Liu Co-authored-by: Jay Foad >From 4d6e3098540bc655b12374d7ac7d0fa13cccbec3 Mon Sep 17

[clang] [llvm] [AMDGPU][gfx1250] Add 128B cooperative atomics (PR #156418)

2025-09-02 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/156418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][gfx1250] Add 128B cooperative atomics (PR #156418)

2025-09-02 Thread Shilei Tian via cfe-commits
@@ -145,6 +154,50 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, return false; } +bool SemaAMDGPU::checkCoopAtomicFunctionCall(CallExpr *TheCall, bool IsStore) { + bool Fail = false; + + // First argument is a global or generic pointer. + Expr *Pt

[clang] [llvm] Openmp 6.0 allow default clause on the target directive (PR #154942)

2025-08-26 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,51 @@ + +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=60 -DOMP60 %s -Wuninitialized + +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=60 -DOMP60 %s -Wuninitialized + +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=52 -DOMP52 %s -Wuninitialize

[clang] [llvm] [AMDGPU][Clang] Allow amdgpu-waves-per-eu attribute to lower target occupancy range (PR #138284)

2025-08-26 Thread Shilei Tian via cfe-commits
shiltian wrote: Looking at this now, it doesn't seem the same as it was at the start. For the latest changes, I think @arsenm made it clear that waves-per-eu values should always give way to the values calculated from flat-workgroup-size if they differ, since flat-workgroup-size is ABI and wav

[clang] [AMDGCN] Add missing gfx1250 clang tests. NFC. (PR #155478)

2025-08-26 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/155478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cleanup 20250823 ret clang (PR #155138)

2025-08-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. The title needs to be more specific. https://github.com/llvm/llvm-project/pull/155138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

2025-08-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Has `dyn_groupprivate` already been approved to be in 6.1 or is this just a PoC implementation? https://github.com/llvm/llvm-project/pull/152651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

2025-08-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/152651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Don't allow wgp mode on gfx1250 (PR #153680)

2025-08-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/153680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_ds_bpermute argument types (PR #153501)

2025-08-13 Thread Shilei Tian via cfe-commits
@@ -159,6 +159,119 @@ Value *EmitAMDGPUGridSize(CodeGenFunction &CGF, unsigned Index) { llvm::MDNode::get(CGF.getLLVMContext(), {})); return LD; } +// Lowers __builtin_amdgcn_ds_bpermute to the corresponding LLVM intrinsic with +// careful bit-level coercio

[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_ds_bpermute argument types (PR #153501)

2025-08-13 Thread Shilei Tian via cfe-commits
@@ -159,6 +159,119 @@ Value *EmitAMDGPUGridSize(CodeGenFunction &CGF, unsigned Index) { llvm::MDNode::get(CGF.getLLVMContext(), {})); return LD; } +// Lowers __builtin_amdgcn_ds_bpermute to the corresponding LLVM intrinsic with +// careful bit-level coercio

[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_ds_bpermute argument types (PR #153501)

2025-08-13 Thread Shilei Tian via cfe-commits
@@ -18,6 +18,132 @@ #include "llvm/Support/AtomicOrdering.h" #include +namespace { + +using llvm::StringRef; +using namespace clang; + +/// Attempts to apply a user-defined conversion on Arg at ArgIndex to a +/// 32-bit-compatible type. If successful, updates TheCall's argume

[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_ds_bpermute argument types (PR #153501)

2025-08-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian deleted https://github.com/llvm/llvm-project/pull/153501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend __builtin_amdgcn_ds_bpermute argument types (PR #153501)

2025-08-13 Thread Shilei Tian via cfe-commits
@@ -159,6 +159,119 @@ Value *EmitAMDGPUGridSize(CodeGenFunction &CGF, unsigned Index) { llvm::MDNode::get(CGF.getLLVMContext(), {})); return LD; } +// Lowers __builtin_amdgcn_ds_bpermute to the corresponding LLVM intrinsic with +// careful bit-level coercio

[clang] [Clang] Hide `offload-arch` initialization erros behind verbose flag (PR #151964)

2025-08-04 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/151964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-07-31 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/135079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Support builtin/intrinsics for async loads/stores on gfx1250 (PR #151058)

2025-07-29 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/151058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Adds omp_target_is_accessible routine (PR #138294)

2025-07-28 Thread Shilei Tian via cfe-commits
shiltian wrote: FWIW, https://github.com/llvm/llvm-project/pull/143058 seems like doing the same thing. https://github.com/llvm/llvm-project/pull/138294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [Clang] Search for 'offload-arch' only next to the clang driver (PR #150965)

2025-07-28 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. Is clang tools always installed? https://github.com/llvm/llvm-project/pull/150965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang][Unittest] Support for `target` update directive and `from` clause in clang unittests (PR #150580)

2025-07-25 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: it doesn't seem to be tested? https://github.com/llvm/llvm-project/pull/150580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Select VMEM prefetch for llvm.prefetch on gfx1250 (PR #150493)

2025-07-24 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/150493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][AMDGPU] Rename "amdgpu-as" to "amdgpu-synchronize-as" (PR #148627)

2025-07-23 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/148627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Rework creating offloading toolchains (PR #125556)

2025-07-22 Thread Shilei Tian via cfe-commits
shiltian wrote: I don't know which one. My PRs yesterday afternoon have a lot of crash in ADT but after rebase a couple of hours later they were gone. I suppose that would be the one. https://github.com/llvm/llvm-project/pull/125556 ___ cfe-commits m

[clang] [Clang] Rework creating offloading toolchains (PR #125556)

2025-07-22 Thread Shilei Tian via cfe-commits
shiltian wrote: Someone else messed up it. The commit has been reverted. https://github.com/llvm/llvm-project/pull/125556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Support v_wmma_f32_16x16x128_f8f6f4 on gfx1250 (PR #149684)

2025-07-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/149684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_sat_pk4_i4_[i8,u8]` on gfx1250 (PR #149528)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/149528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_sat_pk4_i4_[i8,u8]` on gfx1250 (PR #149528)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149528 >From 3fb65bcda47f66a47c8295e04102a3a1d675dbd7 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:36:56 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_sat_pk4_i4_[i8,u8]` on gfx1250 Co-au

[clang] [llvm] [AMDGPU] Add support for `v_sat_pk4_i4_[i8,u8]` on gfx1250 (PR #149528)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/149528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/149518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From d58f9605434bfc4de1820f7c6beabd82586a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From f7c11e672cebd2488582ee89e66d9777182db1e1 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From e6d5fd17af108d454e43a6489eb7580bf007a170 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From 8f89191a1714b2e891eda67d844d32be2ccfc27a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From 1d045407b88bc8efae91410223e8ba980cdec6d1 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From 4d850d602b45130ae958776cd353512116bd5862 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Jul 18, 4:46 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/149518). https://github.com/llvm/llvm-project/pull/149518 ___

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From 33991acfd14b041071d112de032afe94c6bedf35 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/149518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/149450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 (PR #149518)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149518 >From 345d4d9de11d21c1b087cdf88de22f0d90a7ba9f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 10:02:30 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_permlane16_swap_b32` on gfx1250 Co-a

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Jul 18, 2:58 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/149450). https://github.com/llvm/llvm-project/pull/149450 ___

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
@@ -4007,7 +4007,8 @@ SDValue AMDGPUTargetLowering::performIntrinsicWOChainCombine( case Intrinsic::amdgcn_rcp_legacy: case Intrinsic::amdgcn_rsq_legacy: case Intrinsic::amdgcn_rsq_clamp: - case Intrinsic::amdgcn_tanh: { + case Intrinsic::amdgcn_tanh: + case Intrinsic

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149450 >From e35cd5506ed733fcb62eab4c28ab4e9f5966216f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 00:26:15 -0400 Subject: [PATCH 1/2] [AMDGPU] Add support for `v_prng_b32` on gfx1250 Co-authored

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
@@ -4007,7 +4007,8 @@ SDValue AMDGPUTargetLowering::performIntrinsicWOChainCombine( case Intrinsic::amdgcn_rcp_legacy: case Intrinsic::amdgcn_rsq_legacy: case Intrinsic::amdgcn_rsq_clamp: - case Intrinsic::amdgcn_tanh: { + case Intrinsic::amdgcn_tanh: + case Intrinsic

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149450 >From e35cd5506ed733fcb62eab4c28ab4e9f5966216f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 00:26:15 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_prng_b32` on gfx1250 Co-authored-by:

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/149450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add the missing builtin `__builtin_amdgcn_sqrt_bf16` (PR #149447)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/149447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add the missing builtin `__builtin_amdgcn_sqrt_bf16` (PR #149447)

2025-07-18 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Jul 18, 12:42 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/149447). https://github.com/llvm/llvm-project/pull/149447 __

[clang] [llvm] [AMDGPU] Add support for `v_tanh_f32` on gfx1250 (PR #149360)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/149360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_tanh_f32` on gfx1250 (PR #149360)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149360 >From 10b9379f759506e4e1e3c1cab1191ed386609ebe Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 17 Jul 2025 13:03:14 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_tanh_f32` on gfx1250 Co-authored-by:

[clang] [llvm] [AMDGPU] Add support for `v_tanh_f32` on gfx1250 (PR #149360)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/149360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_cos_bf16` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/149355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_cos_bf16` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Jul 17, 6:41 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/149355). https://github.com/llvm/llvm-project/pull/149355 ___

[clang] [llvm] [AMDGPU] Add support for `v_cos_bf16` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/149355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_cos_bf16_e64` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
shiltian wrote: Oh nice catch. Thanks. https://github.com/llvm/llvm-project/pull/149355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add support for `v_cos_bf16_e64` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
shiltian wrote: but we do have `v_cos_bf16` in `llvm/test/MC/AMDGPU/gfx1250_asm_vop1.s`? https://github.com/llvm/llvm-project/pull/149355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [llvm] [AMDGPU] Add support for `v_sin_bf16_e64` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149355 >From 29b54575b3e64372750466dfafab971697f402f1 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 17 Jul 2025 12:45:33 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_sin_bf16_e64` on gfx1250 Co-authored

[clang] [llvm] [AMDGPU] Add support for `v_sin_bf16_e64` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#149355** https://app.graphite.dev/github/pr/llvm/llvm-project/149355?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/149

[clang] [llvm] [AMDGPU] Add support for `v_sin_bf16_e64` on gfx1250 (PR #149355)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/149355 Co-authored-by: Mekhanoshin, Stanislav >From a6b7ccf491c4d88b18bfdba0dbf839030df189ec Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Thu, 17 Jul 2025 12:45:33 -0400 Subject: [PATCH] [AMDGPU] Add support for

[clang] [AST] Remove an unnecessary cast (NFC) (PR #149338)

2025-07-17 Thread Shilei Tian via cfe-commits
@@ -610,7 +610,7 @@ void StmtPrinter::VisitObjCAtTryStmt(ObjCAtTryStmt *Node) { } } - if (auto *FS = static_cast(Node->getFinallyStmt())) { + if (auto *FS = Node->getFinallyStmt()) { shiltian wrote: If there is no cast, then we'd want to use the type

[clang] [AST] Remove an unnecessary cast (NFC) (PR #149338)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/149338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Remove unnecessary casts (NFC) (PR #149340)

2025-07-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/149340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   10   >