[clang] [clang] Migrate away from ArrayRef(std::nullopt) (NFC) (PR #144982)

2025-06-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-06-19 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Moving them into clc should resolve the concern, but I don't know where is > destination directory in clc. I don't know how to map `opencl/lib/amdgcn` and > `opencl/lib/r600` to `clc/lib/amdgcn` and `clc/lib/amdgpu`. Do you have > suggestions about the mapping? r600 and amdgcn

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

2025-06-18 Thread Matt Arsenault 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] [HIP] Emit the CUID value in the module with the new driver (PR #144570)

2025-06-18 Thread Matt Arsenault via cfe-commits
arsenm wrote: > `llvm.compiler.used` global uses AS(0) which makes SPIR-V unhappy, but with > this global it's AS(4) which makes it happy. Either way, this should be fixed. llvm.used and llvm.compiler.used should universally use addrspace(0) and SPIRV should be fixed to not break on this

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

2025-06-17 Thread Matt Arsenault via cfe-commits
arsenm wrote: > and that's why you want to have single element loads that get inserted into a > vector and then perform sub-vector extracts on it? We care about eliminate stack usage at any cost. Big load are always better, even if not naturally aligned. When we do care about alignment, we onl

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

2025-06-17 Thread Matt Arsenault via cfe-commits
arsenm wrote: > We do support unaligned access IIUC, and it is actually required by HSA ABI. > CC @arsenm Unaligned access has been supported since almost always. There's just a mode control for it, you can disable it in the driver though https://github.com/llvm/llvm-project/pull/133301 __

[clang] [clang] Use StringRef in range-based for loops (NFC) (PR #144242)

2025-06-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [modularize] Use range-based for loops (NFC) (PR #144244)

2025-06-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use range-based for loops (NFC) (PR #144250)

2025-06-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (PR #143507)

2025-06-12 Thread Matt Arsenault 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?= Message-ID: In-Reply-To: @@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -Wconversion -Werror -fsyntax-only -

[clang] [Clang][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (PR #143507)

2025-06-11 Thread Matt Arsenault 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?= Message-ID: In-Reply-To: @@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -Wconversion -Werror -fsyntax-only -

[clang] [Clang][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (PR #143507)

2025-06-10 Thread Matt Arsenault 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?= Message-ID: In-Reply-To: @@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -Wconversion -Werror -fsyntax-only -

[clang] [DirectoryWatcher] Use llvm::find (NFC) (PR #143337)

2025-06-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/143337 ___ 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 unused local variables (NFC) (PR #142881)

2025-06-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/142881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [tools] Remove unused local variables (NFC) (PR #142880)

2025-06-04 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/142880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-03 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/142534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/142534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: * **#142534** https://app.graphite.dev/github/pr/llvm/llvm-project/142534?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/14253

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/142534 None >From ef0db5d83400a2d43a8706cbfb7374a91d68f72f Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 2 Jun 2025 16:58:10 +0200 Subject: [PATCH] clang: Fix wrong C++ marker in tablegen file --- clang/in

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

2025-06-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. 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] [Serialization] Remove unused includes (NFC) (PR #142300)

2025-06-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/142300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Remove unused includes (NFC) (PR #142255)

2025-05-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/142255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Frontend] Remove unused includes (NFC) (PR #142256)

2025-05-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/142256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-28 Thread Matt Arsenault via cfe-commits
@@ -121,14 +121,21 @@ bool IsValidCloning(const MachineFunction &MF, } if (PathBB->isMachineBlockAddressTaken()) { // Avoid cloning blocks which have their address taken since we can't -// rewire branches to those blocks as easily (e.g., branches wit

[clang] [llvm] [ARM, AArch64] Don't put BTI at asm goto branch targets (PR #141562)

2025-05-28 Thread Matt Arsenault via cfe-commits
@@ -121,14 +121,21 @@ bool IsValidCloning(const MachineFunction &MF, } if (PathBB->isMachineBlockAddressTaken()) { // Avoid cloning blocks which have their address taken since we can't -// rewire branches to those blocks as easily (e.g., branches wit

[libclc] [libclc] Move vload & vstore to CLC library (PR #141755)

2025-05-28 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] fix amdgpu_max_num_work_groups in templates (PR #141633)

2025-05-28 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] fix amdgpu_max_num_work_groups in templates (PR #141633)

2025-05-27 Thread Matt Arsenault via cfe-commits
@@ -78,6 +78,12 @@ __global__ void template_32_4_a_max_num_work_groups() {} template __global__ void template_32_4_a_max_num_work_groups<2>(); // CHECK: define{{.*}} amdgpu_kernel void @_Z35template_32_4_a_max_num_work_groupsILj2EEvv() [[MAX_NUM_WORK_GROUPS_32_4_2:#[0-9]+]]

[clang] [HIP] disable sanitizer for `__hip_cuid` (PR #141581)

2025-05-27 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Lex] Remove unused includes (NFC) (PR #141523)

2025-05-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Parse] Remove unused includes (NFC) (PR #141524)

2025-05-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove unused includes (NFC) (PR #141448)

2025-05-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Use llvm::none_of (NFC) (PR #141447)

2025-05-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Analysis] Use llvm::erase_if (NFC) (PR #141446)

2025-05-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Drop const from a return type (NFC) (PR #141414)

2025-05-25 Thread Matt Arsenault via cfe-commits
@@ -537,7 +537,7 @@ class StdLibraryFunctionsChecker /// a later bug report created by ErrnoChecker. /// Empty return value means that 'errno' related bug may not happen from /// the current analyzed function. -virtual const std::string describe(CheckerContext &

[clang] [StaticAnalyzer] Drop const from a return type (NFC) (PR #141414)

2025-05-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Remove unused includes (NFC) (PR #141419)

2025-05-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Remove unused includes (NFC) (PR #141417)

2025-05-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Remove unused includes (NFC) (PR #141420)

2025-05-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use StringRef::contains (NFC) (PR #141413)

2025-05-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141413 ___ 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 Matt Arsenault via cfe-commits
https://github.com/arsenm 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] [CodeGen] Remove unused includes (NFC) (PR #141418)

2025-05-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm 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-tools-extra] [clang-doc] Use llvm::any_of (NFC) (PR #141315)

2025-05-23 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use llvm::any_of (NFC) (PR #141314)

2025-05-23 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/141314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add (fast) normalize to CLC; add half overloads (PR #139759)

2025-05-22 Thread Matt Arsenault via cfe-commits
arsenm wrote: > The OpenCL-CTS doesn't actually test the geometrics builtins with that option > - that's just for bruteforce. Sounds like a bug > It passes on an OpenCL implementation which advertises support for > single-precision denormals, yes. Ideally would check it works with denormal f

[clang] [clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (PR #141053)

2025-05-22 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. Doesn't seem right that this is looking to the IR for the size instead of directly at the source type https://github.com/llvm/llvm-project/pull/141053 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (PR #141053)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -1,8 +1,6 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 -// RUN: %clang_cc1 -O0 -cl-std=CL2.0 -triple amdgcn-amd-amdhsa -target-cpu gfx942 \ -// RUN: %s -emit-llvm -o - | FileCheck %s - -// REQUIRES: amdgpu-registere

[clang] [clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (PR #141053)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,45 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -O0 -cl-std=CL2.0 -triple amdgcn-amd-amdhsa -target-cpu gfx942 \ +// RUN: %s -emit-llvm -o - | FileCheck %s + +// REQUIRES: amdgpu-register

[clang] [clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (PR #141053)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,45 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -O0 -cl-std=CL2.0 -triple amdgcn-amd-amdhsa -target-cpu gfx942 \ +// RUN: %s -emit-llvm -o - | FileCheck %s + +// REQUIRES: amdgpu-register

[clang] [clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (PR #141053)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -274,9 +274,10 @@ Value *EmitFromInt(CodeGenFunction &CGF, llvm::Value *V, Address CheckAtomicAlignment(CodeGenFunction &CGF, const CallExpr *E) { ASTContext &Ctx = CGF.getContext(); Address Ptr = CGF.EmitPointerWithAlignment(E->getArg(0)); + const llvm::DataLayout &DL

[clang] [clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (PR #141053)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,45 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -O0 -cl-std=CL2.0 -triple amdgcn-amd-amdhsa -target-cpu gfx942 \ arsenm wrote: -disable-llvm-passes, and can you use -cl-st

[clang] [clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (PR #141053)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,45 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -O0 -cl-std=CL2.0 -triple amdgcn-amd-amdhsa -target-cpu gfx942 \ +// RUN: %s -emit-llvm -o - | FileCheck %s + +// REQUIRES: amdgpu-register

[clang] [lld] [llvm] [mlir] [LLVM][Windows] Elide `PrettyStackTrace` output for usage errors (PR #140956)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -1,15 +1,26 @@ -; REQUIRES: x86, non-root-user -;; Not supported on windows since we use permissions to deny the creation -; UNSUPPORTED: system-windows +;; The output is OS-specific, so this test is limited to Windows. arsenm wrote: This new failure condition

[clang] [lld] [llvm] [mlir] [LLVM][Windows] Elide `PrettyStackTrace` output for usage errors (PR #140956)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -744,7 +744,7 @@ template class [[nodiscard]] Expected { /// @deprecated Use reportFatalInternalError() or reportFatalUsageError() /// instead. [[noreturn]] LLVM_ABI void report_fatal_error(Error Err, - bool gen_crash_diag = true

[clang] [lld] [llvm] [mlir] [LLVM][Windows] Elide `PrettyStackTrace` output for usage errors (PR #140956)

2025-05-22 Thread Matt Arsenault via cfe-commits
@@ -1,15 +1,26 @@ -; REQUIRES: x86, non-root-user -;; Not supported on windows since we use permissions to deny the creation -; UNSUPPORTED: system-windows +;; The output is OS-specific, so this test is limited to Windows. arsenm wrote: Switching a test from "not

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

2025-05-22 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeGen] Expose the extensibility of PassConfig to plugins (PR #139059)

2025-05-21 Thread Matt Arsenault via cfe-commits
arsenm wrote: > I don't think you can reasonably test this with a lit test, you have to add > this as a proper build target in llvm/examples similar to Bye. A lit test could then drive the load of that plugin, but the lit test can't contain the pass itself https://github.com/llvm/llvm-projec

[clang] [llvm] [CodeGen] Expose the extensibility of PassConfig to plugins (PR #139059)

2025-05-21 Thread Matt Arsenault via cfe-commits
arsenm wrote: I don't think you can reasonably test this with a lit test, you have to add this as a proper build target in llvm/examples similar to Bye https://github.com/llvm/llvm-project/pull/139059 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [llvm] [AMDGPU] Fix opsel for scaled MFMA operations (PR #140183)

2025-05-21 Thread Matt Arsenault via cfe-commits
@@ -8811,6 +8820,68 @@ void AMDGPUAsmParser::cvtVINTERP(MCInst &Inst, const OperandVector &Operands) Inst.getOperand(ModIdx).setImm(ModVal); } } +void AMDGPUAsmParser::cvtScaledMFMA(MCInst &Inst, +const OperandVector &Operands) { + Op

[clang] [llvm] [AMDGPU] Fix opsel for scaled MFMA operations (PR #140183)

2025-05-21 Thread Matt Arsenault via cfe-commits
@@ -8811,6 +8820,68 @@ void AMDGPUAsmParser::cvtVINTERP(MCInst &Inst, const OperandVector &Operands) Inst.getOperand(ModIdx).setImm(ModVal); } } +void AMDGPUAsmParser::cvtScaledMFMA(MCInst &Inst, +const OperandVector &Operands) { + Op

[clang] [llvm] [AMDGPU] Fix opsel for scaled MFMA operations (PR #140183)

2025-05-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Fix opsel for scaled MFMA operations (PR #140183)

2025-05-21 Thread Matt Arsenault via cfe-commits
@@ -8811,6 +8820,68 @@ void AMDGPUAsmParser::cvtVINTERP(MCInst &Inst, const OperandVector &Operands) Inst.getOperand(ModIdx).setImm(ModVal); } } +void AMDGPUAsmParser::cvtScaledMFMA(MCInst &Inst, +const OperandVector &Operands) { + Op

[libclc] [libclc] Support the generic address space (PR #137183)

2025-05-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/137183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Support the generic address space (PR #137183)

2025-05-21 Thread Matt Arsenault via cfe-commits
@@ -420,12 +420,37 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) -D${CLC_TARGET_DEFINE} # All libclc builtin libraries see CLC headers -I${CMAKE_CURRENT_SOURCE_DIR}/clc/include + # Error on undefined macros + -Werror=undef ) if( NOT "${cpu}"

[libclc] [libclc] Move all remquo address spaces to CLC library (PR #140871)

2025-05-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Support the OpenCL generic addrspace feature by default (PR #137940)

2025-05-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/137940 ___ 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 control flow statements (NFC) (PR #140846)

2025-05-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add (fast) normalize to CLC; add half overloads (PR #139759)

2025-05-20 Thread Matt Arsenault via cfe-commits
arsenm wrote: > I wasn't sure if this was necessary so this commit replaces the vector2 > versions of the constants with the vector3/vector4 ones. The OpenCL-CTS seems > okay with it. If this is incorrect then it's not very difficult to split them > back out again. Does it pass with -cl-denor

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-05-19 Thread Matt Arsenault via cfe-commits
arsenm wrote: > If you want to add new intrinsics that don't have the offset and that > pattern-match instead, I'd be more than happy to review that - or if we want > to break back-compat by getting rid of the offset. I don't think we need to worry about compatibility with an intrinsic that's

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-05-19 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,63 @@ +# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown -run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s +# REQUIRES: asserts +--- +name:faceforward_instcombine_float +tracksRegLiveness: true +legalized: true +body:

[clang] [llvm] [mlir] [LLVM][TableGen] Rename `ListInit::getValues()` to `getElements()` (PR #140289)

2025-05-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Reorganize OpenCL builtins (PR #140557)

2025-05-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-05-19 Thread Matt Arsenault via cfe-commits
arsenm wrote: I think we'd be better off omitting the offset from the intrinsic signature https://github.com/llvm/llvm-project/pull/137425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[libclc] [libclc] Mov erf & erfc to CLC library (PR #140524)

2025-05-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use *Map::try_emplace (NFC) (PR #140477)

2025-05-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove redundant control flow statements (NFC) (PR #140359)

2025-05-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-05-16 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > I am not ok with this being an error by default. > > I think compilation must fail when an unsupported and untested option is > specified. And that includes when the target is SPIR-V. I would call it a supported and used option. The unsupported and untested pieces are in the

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-05-16 Thread Matt Arsenault via cfe-commits
arsenm wrote: It's really a library problem, not a codegen issue. The library should still be emitting the warning. You should be able to write wave64 code unperturbed due to hip standard library bugs https://github.com/llvm/llvm-project/pull/140185 ___

[clang] [HIP] diagnose -mwavefrontsize64 for gfx10+ (PR #140185)

2025-05-16 Thread Matt Arsenault via cfe-commits
arsenm wrote: I am not ok with this being an error by default. https://github.com/llvm/llvm-project/pull/140185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-16 Thread Matt Arsenault via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

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

2025-05-16 Thread Matt Arsenault via cfe-commits
arsenm wrote: I thought we already added a generic -stdinc/nostdinc for this 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] [clang] Use llvm::binary_search (NFC) (PR #140216)

2025-05-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/140216 ___ 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 Matt Arsenault 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 + +#pragma OPENCL EXTENSION cl_khr_fp64:enable + +typedef int v8i __attribut

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

2025-05-16 Thread Matt Arsenault 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] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-05-16 Thread Matt Arsenault 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 Matt Arsenault 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 Matt Arsenault 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 + +#pragma OPENCL EXTENSION cl_khr_fp64:enable + +typedef int v8i __attribut

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

2025-05-16 Thread Matt Arsenault 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 Matt Arsenault 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 + +#pragma OPENCL EXTENSION cl_khr_fp64:enable + +typedef int v8i __attribut

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

2025-05-16 Thread Matt Arsenault 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 + +#pragma OPENCL EXTENSION cl_khr_fp64:enable arsenm wrote

[clang] Pre-Commit tests: [HIP] Fix return type in __clang_hip_cmath.h (PR #139891)

2025-05-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/139891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-14 Thread Matt Arsenault via cfe-commits
@@ -127,11 +127,7 @@ template constexpr vector lit_impl(T NDotL, T NDotH, T M) { } template constexpr T faceforward_impl(T N, T I, T Ng) { -#if (__has_builtin(__builtin_spirv_faceforward)) - return __builtin_spirv_faceforward(N, I, Ng); -#else return select(dot(I, Ng) <

[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

2025-05-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Description mentions instcombine but this has nothing to do with instcombine https://github.com/llvm/llvm-project/pull/139959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [HIP] Fix return type in __clang_hip_cmath.h (PR #139697)

2025-05-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Needs header test https://github.com/llvm/llvm-project/pull/139697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move cross to CLC library; add missing half overloads (PR #139713)

2025-05-13 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/139713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] change default offload archs (PR #139281)

2025-05-13 Thread Matt Arsenault via cfe-commits
arsenm wrote: > It's just the AMDGCN target without any `+features`, right? The only issue I > was aware of was assuming w64 when unspecified but you fixed that previously. Almost, but it's problematic in several ways. The problems multiply once you start adding in manually specified target_fe

[libclc] [libclc] Move (fast) length & distance to CLC library (PR #139701)

2025-05-13 Thread Matt Arsenault via cfe-commits
@@ -43,7 +43,9 @@ _CLC_OVERLOAD _CLC_DEF __CLC_SCALAR_GENTYPE __clc_length(__CLC_GENTYPE p) { if (l2 < __CLC_GENTYPE_MIN) { p *= __CLC_GENTYPE_MIN_SCALE_UP; return __clc_sqrt(__clc_dot(p, p)) * __CLC_GENTYPE_MIN_SCALE_DOWN; - } else if (l2 == INFINITY) { + } + + i

[libclc] [libclc] Move logb/ilogb to CLC library; optimize (PR #128028)

2025-05-13 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. I still think this should be fixed to be in terms of frexp utilities but this is just moving it anyway and that's separate https://github.com/llvm/llvm-project/pull/128028 ___ cfe-commits mailing

  1   2   3   4   5   6   7   8   9   10   >