[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-03-28 Thread Shilei Tian via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: @@ -0,0 +1,45 @@ +; RUN: split-file %s %t shiltian wrote: This is an interesting thing that I learned from this PR. :-) https://github.com/l

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-02 Thread Shilei Tian via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?=

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-04-02 Thread Shilei Tian via cfe-commits
shiltian wrote: @asb I did receive some emails initially but haven't gotten any lately. I assumed that issue had been fixed, as it seemed like the driver was just unconditionally adding `unknown`. https://github.com/llvm/llvm-project/pull/122629 ___

[clang] [llvm] [Clang][AMDGPU] Add __builtin_amdgcn_cvt_off_f32_i4 (PR #133741)

2025-04-04 Thread Shilei Tian via cfe-commits
shiltian wrote: Why this lowering? We have a table right? https://github.com/llvm/llvm-project/pull/133741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-04-04 Thread Shilei Tian via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: https://github.com/shiltian approved this pull request. https://github.com/llv

[clang] [StaticAnalyzer] Remove redundant calls to std::unique_ptr::get (NFC) (PR #139353)

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

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-05-08 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,84 @@ +//===-- llvm/Target/TargetVerifier.h - LLVM IR Target Verifier --*- 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: Apa

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-05-08 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,84 @@ +//===-- llvm/Target/TargetVerifier.h - LLVM IR Target Verifier --*- 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: Apa

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-05-08 Thread Shilei Tian via cfe-commits
@@ -481,6 +481,9 @@ static cl::opt HasClosedWorldAssumption( cl::desc("Whether has closed-world assumption at link time"), cl::init(false), cl::Hidden); +static cl::opt VerifyTarget("verify-tgt", shiltian wrote: `verify-tgt` is too broad. I'd add an `

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-05-08 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,84 @@ +//===-- llvm/Target/TargetVerifier.h - LLVM IR Target Verifier --*- 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: Apa

[clang] [OpenMP] Fix a crash on invalid with unroll partial (PR #139280)

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

[clang] [Tooling] Remove a redundant call to std::unique_ptr::get (NFC) (PR #139431)

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

[clang-tools-extra] [modularize] Use default member initialization for Location (NFC) (PR #139384)

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

[clang-tools-extra] [clang-tools-extra] Remove redundant calls to std::unique_ptr::get (NFC) (PR #138774)

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

[clang] [OpenMP] Fix crash with invalid size expression (PR #139745)

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

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-05-16 Thread Shilei Tian via cfe-commits
@@ -683,6 +683,30 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_2d_f32_i32: { +llvm::Type *RetTy = llvm::Type::getFloatTy(Builder.getContext()); +

[clang] [clang] Use llvm::replace (NFC) (PR #140264)

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

[clang] [Frontend] Avoid creating a temporary instance of std::string (NFC) (PR #140326)

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

[clang] [CUDA][HIP] add option -gpuinc (PR #140106)

2025-05-15 Thread Shilei Tian via cfe-commits
shiltian wrote: Hmm, in what cases `-nogpuinc` is added but we don't actually want it? https://github.com/llvm/llvm-project/pull/140106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Use std::binary_search (NFC) (PR #140263)

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

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-05-16 Thread Shilei Tian via cfe-commits
@@ -683,6 +683,30 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_2d_f32_i32: { +llvm::Type *RetTy = llvm::Type::getFloatTy(Builder.getContext()); +

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-05-16 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,31 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown %s -emit-llvm -o - | FileCheck %s shiltian wrote: use right triple `amdgcn-amd-amdhsa` pls

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-05-16 Thread Shilei Tian via cfe-commits
@@ -683,6 +683,30 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_2d_f32_i32: { +llvm::Type *RetTy = llvm::Type::getFloatTy(Builder.getContext());

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-05-16 Thread Shilei Tian via cfe-commits
@@ -635,5 +635,10 @@ TARGET_BUILTIN(__builtin_amdgcn_bitop3_b16, "IUi", "nc", "bitop3-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf16_f32, "V2yV2yfUiIb", "nc", "f32-to-f16bf16-cvt-sr-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_f16_f32, "V2hV2hfUiIb", "nc", "f32-to-

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

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

[clang] [clang] Use llvm::stable_sort (NFC) (PR #140413)

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

[clang-tools-extra] [clang-include-fixer] Remove an unused "using" decl (NFC) (PR #140354)

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

[clang-tools-extra] [clang-include-fixer] Remove an unused "using" decl (NFC) (PR #140354)

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

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

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

[clang-tools-extra] [clang-tools-extra] Use llvm::find_if (NFC) (PR #140411)

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

[clang-tools-extra] [clang-tools-extra] Use llvm::is_contained (NFC) (PR #140456)

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

[clang-tools-extra] [clang-tools-extra] Use llvm::is_contained (NFC) (PR #140456)

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

[clang-tools-extra] [clang-tools-extra] Use llvm::max_element (NFC) (PR #140458)

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

[clang-tools-extra] [clang-tools-extra] Use llvm::max_element (NFC) (PR #140458)

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

[clang] [clang] Use llvm::unique (NFC) (PR #140459)

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

[clang] [clang] Use llvm::unique (NFC) (PR #140459)

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

[clang] [Sema] Use llvm::is_contained (NFC) (PR #140455)

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

[clang] [Sema] Use llvm::is_contained (NFC) (PR #140455)

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

[clang] [clang] Use llvm::max_element (NFC) (PR #140435)

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

[clang] [CodeGen] Use DenseMap::try_emplace (NFC) (PR #140430)

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

[clang] [CodeGen] Remove unused includes (NFC) (PR #141418)

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

[clang] [Driver] Use StringRef::consume_front (NFC) (PR #141412)

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

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread Shilei Tian via cfe-commits
@@ -14924,8 +14924,25 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, SourceLocation FactorLoc; if (Expr *FactorVal = PartialClause->getFactor(); FactorVal && !FactorVal->containsErrors()) { +if (!VerifyPositiveIntegerConstantInClause(Facto

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread Shilei Tian via cfe-commits
@@ -14924,8 +14924,25 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, SourceLocation FactorLoc; if (Expr *FactorVal = PartialClause->getFactor(); FactorVal && !FactorVal->containsErrors()) { +if (!VerifyPositiveIntegerConstantInClause(Facto

[clang] [OpenMP] Add diagnostic for 'factor' width mismatch in 'unroll partial' (PR #139986)

2025-05-15 Thread Shilei Tian via cfe-commits
@@ -14924,8 +14924,25 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, SourceLocation FactorLoc; if (Expr *FactorVal = PartialClause->getFactor(); FactorVal && !FactorVal->containsErrors()) { +if (!VerifyPositiveIntegerConstantInClause(Facto

[clang] [CUDA][HIP] add option -gpuinc (PR #140106)

2025-05-15 Thread Shilei Tian via cfe-commits
shiltian wrote: > comgr is the JIT compiler for HIP on ROCm. comgr uses -nogpuinc by default. > However, some users of comgr need to override that so that comgr enables the > wrapper headers. We cannot simply let comgr stop using -nogpuinc by default > since it will break existing comgr users.

[clang] [clang] Use llvm::find_if (NFC) (PR #140983)

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

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-22 Thread Shilei Tian via cfe-commits
@@ -11762,52 +11762,98 @@ bool OpenMPAtomicCompareChecker::checkCondUpdateStmt(IfStmt *S, X = BO->getLHS(); - auto *Cond = dyn_cast(S->getCond()); - if (!Cond) { -ErrorInfo.Error = ErrorTy::NotABinaryOp; -ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = S->getCond()->get

[clang] [clang] Avoid creating temporary instances of std::string (NFC) (PR #140988)

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

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-22 Thread Shilei Tian via cfe-commits
@@ -11762,52 +11762,98 @@ bool OpenMPAtomicCompareChecker::checkCondUpdateStmt(IfStmt *S, X = BO->getLHS(); - auto *Cond = dyn_cast(S->getCond()); - if (!Cond) { -ErrorInfo.Error = ErrorTy::NotABinaryOp; -ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = S->getCond()->get

[clang] [OpenMP] Fix atomic compare handling with overloaded operators (PR #141142)

2025-05-22 Thread Shilei Tian via cfe-commits
@@ -11762,52 +11762,98 @@ bool OpenMPAtomicCompareChecker::checkCondUpdateStmt(IfStmt *S, X = BO->getLHS(); - auto *Cond = dyn_cast(S->getCond()); - if (!Cond) { -ErrorInfo.Error = ErrorTy::NotABinaryOp; -ErrorInfo.ErrorLoc = ErrorInfo.NoteLoc = S->getCond()->get

[clang] [Sema] Fix bug in builtin AS override (PR #138141)

2025-06-02 Thread Shilei Tian via cfe-commits
shiltian wrote: Can you also remove all `t`? They don't seem to be necessary here. https://github.com/llvm/llvm-project/pull/138141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Format] Remove unused includes (NFC) (PR #142296)

2025-05-31 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LGTM as long as it builds successfully. I tried something similar in a few files before, but it ended up breaking the build, so I gave up. :-) https://github.com/llvm/llvm-project/pull/142296 ___

[clang] [Basic] Remove unused includes (NFC) (PR #142295)

2025-05-31 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LGTM as long as it doesn't break the build. https://github.com/llvm/llvm-project/pull/142295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-06-01 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,170 @@ +//===-- AMDGPUTargetVerifier.cpp - AMDGPU ---*- 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] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-06-01 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,170 @@ +//===-- AMDGPUTargetVerifier.cpp - AMDGPU ---*- 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] [Sema] Fix bug in builtin AS override (PR #138141)

2025-05-31 Thread Shilei Tian via cfe-commits
shiltian wrote: Why did we have `t` in some of the builtins in the first place… https://github.com/llvm/llvm-project/pull/138141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU][Driver] Add `avail-extern-gv-in-addrspace-to-local` option when ThinTLO is enabled (PR #144914)

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

[clang] [CodeGen] Use range-based for loops (NFC) (PR #144939)

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

[clang] [clang] Remove unused includes (NFC) (PR #144285)

2025-06-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. CI will tell us whether this is broken or not. :-) https://github.com/llvm/llvm-project/pull/144285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Clang][AMDGPU][Driver] Add `avail-extern-gv-in-addrspace-to-local` option when ThinTLO is enabled (PR #144914)

2025-06-19 Thread Shilei Tian via cfe-commits
shiltian wrote: > Bit of a hack it seems It is a hack (or workaround). The correct approach would be either to redesign the lowering of LDS, or create another flavor of ThinLTO. Neither of it can be done in a reasonably short amount of time. https://github.com/llvm/llvm-project/pull/144914 __

[clang] [Clang][AMDGPU][Driver] Add `avail-extern-gv-in-addrspace-to-local` option when ThinTLO is enabled (PR #144914)

2025-06-19 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#144914** https://app.graphite.dev/github/pr/llvm/llvm-project/144914?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/144

[clang] [Clang][AMDGPU][Driver] Add `avail-extern-gv-in-addrspace-to-local` option when ThinTLO is enabled (PR #144914)

2025-06-19 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/144914 On AMDGPU, we need an extra argument `-avail-extern-gv-in-addrspace-to-local=3` to privatize LDS global variables when ThinLTO is enabled. >From bf7b936421379ae7e043360c6515136660e2e550 Mon Sep 17 00:00:00 2001

[clang] [HIP] Emit the CUID value in the module with the new driver (PR #144570)

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

[clang] [Clang] Add standalone AMDGPU SPIR-V toolchain (PR #144576)

2025-06-18 Thread Shilei Tian via cfe-commits
@@ -417,3 +417,15 @@ void HIPAMDToolChain::checkTargetID( getDriver().Diag(clang::diag::err_drv_bad_target_id) << *PTID.OptionalTargetID; } + +SPIRVAMDToolChain::SPIRVAMDToolChain(const Driver &D, + const llvm::Triple &Triple, +

[clang] [llvm] [AMDGPU] Add s_setprio_inc_wg gfx1250 instruction (PR #145152)

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

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-23 Thread Shilei Tian via cfe-commits
@@ -683,6 +683,206 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_1d_v4f32_i32: + case AMDGPU::BI__builtin_amdgcn_image_load_1darray_v4f32_i32: + case A

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

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

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -5500,7 +5504,34 @@ struct AAAlignCallSiteReturned final using Base = AACalleeToCallSite; AAAlignCallSiteReturned(const IRPosition &IRP, Attributor &A) : Base(IRP, A) {} + ChangeStatus updateImpl(Attributor &A) override { +SmallVector Values; +const auto &

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -1381,7 +1399,7 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM, &AAAMDMaxNumWorkgroups::ID, &AAAMDWavesPerEU::ID, &AAAMDGPUNoAGPR::ID, &AACallEdges::ID, &AAPointerInfo::ID, &AAPotentialConstantValues::ID, &AAUnderlyingObjects::I

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -5500,7 +5504,34 @@ struct AAAlignCallSiteReturned final using Base = AACalleeToCallSite; AAAlignCallSiteReturned(const IRPosition &IRP, Attributor &A) : Base(IRP, A) {} + ChangeStatus updateImpl(Attributor &A) override { +SmallVector Values; +const auto &

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -5500,7 +5504,34 @@ struct AAAlignCallSiteReturned final using Base = AACalleeToCallSite; AAAlignCallSiteReturned(const IRPosition &IRP, Attributor &A) : Base(IRP, A) {} + ChangeStatus updateImpl(Attributor &A) override { +SmallVector Values; +const auto &

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -5500,7 +5504,34 @@ struct AAAlignCallSiteReturned final using Base = AACalleeToCallSite; AAAlignCallSiteReturned(const IRPosition &IRP, Attributor &A) : Base(IRP, A) {} + ChangeStatus updateImpl(Attributor &A) override { +SmallVector Values; +const auto &

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-06-17 Thread Shilei Tian via cfe-commits
shiltian wrote: > I assume AMDGPU does not support unaligned loads We do support unaligned access IIUC, and it is actually required by HSA ABI. CC @arsenm https://github.com/llvm/llvm-project/pull/133301 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang][nvlink-wrapper] Add support for opt-remarks command line options (PR #145365)

2025-06-23 Thread Shilei Tian via cfe-commits
Miguel =?utf-8?q?C=C3=A1rdenas?= , Miguel =?utf-8?q?C=C3=A1rdenas?= , Miguel =?utf-8?q?C=C3=A1rdenas?= Message-ID: In-Reply-To: https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/145365 ___ cfe-commits

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-23 Thread Shilei Tian via cfe-commits
@@ -83,6 +83,38 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, case AMDGPU::BI__builtin_amdgcn_update_dpp: { return checkMovDPPFunctionCall(TheCall, 6, 2); } + case AMDGPU::BI__builtin_amdgcn_image_load_1d_v4f32_i32: + case AMDGPU::BI__builtin

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-23 Thread Shilei Tian via cfe-commits
@@ -683,6 +683,206 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_1d_v4f32_i32: + case AMDGPU::BI__builtin_amdgcn_image_load_1darray_v4f32_i32: + case A

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-23 Thread Shilei Tian via cfe-commits
@@ -128,6 +160,16 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, return false; } +bool SemaAMDGPU::checkImageImmArgFunctionCall(CallExpr *TheCall, + unsigned ArgCount) { + llvm::APSInt Result; + if (!(Se

[clang] [CodeGen] Use range-based for loops (NFC) (PR #145142)

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

[clang] [Clang][NFC] Clean up OpenMP offload toolchain generation (PR #145549)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -1044,82 +1040,78 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, << OpenMPTargets->getAsString(C.getInputArgs()); return; } + + // Make sure these show up in a deterministic order. + std::multiset OpenMPTriples; f

[clang] [Clang][NFC] Clean up OpenMP offload toolchain generation (PR #145549)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -1044,82 +1040,78 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, << OpenMPTargets->getAsString(C.getInputArgs()); return; } + + // Make sure these show up in a deterministic order. + std::multiset OpenMPTriples; f

[clang] [Clang][NFC] Clean up OpenMP offload toolchain generation (PR #145549)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -1044,82 +1040,78 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, << OpenMPTargets->getAsString(C.getInputArgs()); return; } + + // Make sure these show up in a deterministic order. + std::multiset OpenMPTriples; f

[clang] [Clang][NFC] Clean up OpenMP offload toolchain generation (PR #145549)

2025-06-25 Thread Shilei Tian via cfe-commits
@@ -1044,82 +1040,78 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, << OpenMPTargets->getAsString(C.getInputArgs()); return; } + + // Make sure these show up in a deterministic order. + std::multiset OpenMPTriples; f

[clang] [Clang][NFC] Clean up OpenMP offload toolchain generation (PR #145549)

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

[clang] [Sema] Drop const from a return type (NFC) (PR #143224)

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

[clang] [clang] Strip away lambdas (NFC) (PR #143226)

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

[clang] [clang] Use llvm::count (NFC) (PR #143228)

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

[clang-tools-extra] [clang-move] Teach getDeclarationList to return ArrayRef (NFC) (PR #143278)

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

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/146636 ___ 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_cvt_pk_f16_fp8` on gfx1250 (PR #145747)

2025-06-25 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Jun 25, 8:56 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/145747). https://github.com/llvm/llvm-project/pull/145747 ___

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-07-06 Thread Shilei Tian via cfe-commits
@@ -5501,7 +5505,32 @@ struct AAAlignCallSiteReturned final using Base = AACalleeToCallSite; AAAlignCallSiteReturned(const IRPosition &IRP, Attributor &A) : Base(IRP, A) {} + ChangeStatus updateImpl(Attributor &A) override { +SmallVector Values; +SmallVector

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-07-06 Thread Shilei Tian via cfe-commits
@@ -1432,6 +1442,26 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM, } else if (auto *CmpX = dyn_cast(&I)) { A.getOrCreateAAFor( IRPosition::value(*CmpX->getPointerOperand())); + } else if (auto *II = dyn_cast(&I)) { +

[clang-tools-extra] [clangd] Drop const from a return type (NFC) (PR #146707)

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

[clang] [StaticAnalyzer] Remove unnecessary casts (NFC) (PR #146706)

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

[clang] [llvm] AMDGPU: Implement ds_atomic_async_barrier_arrive_b64/ds_atomic_barrier_arrive_rtn_b64 (PR #146409)

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

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

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

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Shilei Tian via cfe-commits
shiltian wrote: I see. That makes sense. Worth a release note item. https://github.com/llvm/llvm-project/pull/146594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Remove an unnecessary cast (NFC) (PR #146547)

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

[clang] [flang] [Clang] Introduce '--offload-targets' for `-fopenmp-targets` (PR #146594)

2025-07-01 Thread Shilei Tian via cfe-commits
shiltian wrote: Why not stick with `--offload-arch` for generic use? I'm not really sure about the motivation. https://github.com/llvm/llvm-project/pull/146594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-07-01 Thread Shilei Tian via cfe-commits
@@ -635,5 +635,66 @@ TARGET_BUILTIN(__builtin_amdgcn_bitop3_b16, "IUi", "nc", "bitop3-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf16_f32, "V2yV2yfUiIb", "nc", "f32-to-f16bf16-cvt-sr-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_f16_f32, "V2hV2hfUiIb", "nc", "f32-to-

<    6   7   8   9   10   11   12   >