[llvm-branch-commits] [llvm] [NFC][IR2Vec] Add missed ptrtoaddr in vocab for tests (PR #153094)

2025-08-11 Thread Aiden Grossman via llvm-branch-commits
https://github.com/boomanaiden154 approved this pull request. This wasn't missed. It's new (patch landed last week I think). Either way, LGTM. https://github.com/llvm/llvm-project/pull/153094 ___ llvm-branch-commits mailing list llvm-branch-commits@li

[llvm-branch-commits] [llvm] [SelectionDAGBuilder] Use address width when lowering ptrtoaddr (PR #139423)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
@@ -3980,8 +3980,16 @@ void SelectionDAGBuilder::visitSIToFP(const User &I) { } void SelectionDAGBuilder::visitPtrToAddr(const User &I) { - // FIXME: this is not correct for pointers with addr width != pointer width - visitPtrToInt(I); + const auto &TLI = DAG.getTargetLower

[llvm-branch-commits] [llvm] [SelectionDAGBuilder] Use address width when lowering ptrtoaddr (PR #139423)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
@@ -3980,8 +3980,16 @@ void SelectionDAGBuilder::visitSIToFP(const User &I) { } void SelectionDAGBuilder::visitPtrToAddr(const User &I) { - // FIXME: this is not correct for pointers with addr width != pointer width - visitPtrToInt(I); + const auto &TLI = DAG.getTargetLower

[llvm-branch-commits] [llvm] [SelectionDAGBuilder] Use address width when lowering ptrtoaddr (PR #139423)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
@@ -3980,8 +3980,16 @@ void SelectionDAGBuilder::visitSIToFP(const User &I) { } void SelectionDAGBuilder::visitPtrToAddr(const User &I) { - // FIXME: this is not correct for pointers with addr width != pointer width - visitPtrToInt(I); + const auto &TLI = DAG.getTargetLower

[llvm-branch-commits] Add IR and codegen support for deactivation symbols. (PR #133536)

2025-08-11 Thread Peter Collingbourne via llvm-branch-commits
pcc wrote: #133534 landed, now unblocked. https://github.com/llvm/llvm-project/pull/133536 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [NFC][IR2Vec] Add missed ptrtoaddr in vocab for tests (PR #153094)

2025-08-11 Thread S. VenkataKeerthy via llvm-branch-commits
svkeerthy wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153094?utm_source=stack-comment-downstack-mergeability-warning

[llvm-branch-commits] [llvm] [NFC][IR2Vec] Add missed ptrtoaddr in vocab for tests (PR #153094)

2025-08-11 Thread S. VenkataKeerthy via llvm-branch-commits
https://github.com/svkeerthy created https://github.com/llvm/llvm-project/pull/153094 None >From 265222ba5b20cc32ae3f9fc9affc42a9bd06cce5 Mon Sep 17 00:00:00 2001 From: svkeerthy Date: Mon, 11 Aug 2025 21:52:27 + Subject: [PATCH] [NFC][IR2Vec] Add missed ptrtoaddr in vocab for tests ---

[llvm-branch-commits] [llvm] [SelectionDAGBuilder] Use address width when lowering ptrtoaddr (PR #139423)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/139423 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] fc9d5f2 - Revert "[DFAJumpThreading] Prevent pass from using too much memory. (#145482)"

2025-08-11 Thread via llvm-branch-commits
Author: XChy Date: 2025-08-12T03:52:37+08:00 New Revision: fc9d5f29201e54017e88593102f81d3019fd61e6 URL: https://github.com/llvm/llvm-project/commit/fc9d5f29201e54017e88593102f81d3019fd61e6 DIFF: https://github.com/llvm/llvm-project/commit/fc9d5f29201e54017e88593102f81d3019fd61e6.diff LOG: Rev

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
@@ -701,3 +808,95 @@ void CGHLSLRuntime::emitInitListOpaqueValues(CodeGenFunction &CGF, } } } + +std::optional CGHLSLRuntime::emitResourceArraySubscriptExpr( +const ArraySubscriptExpr *ArraySubsExpr, CodeGenFunction &CGF) { + assert(ArraySubsExpr->getType()->isHLSLR

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/152454 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
@@ -701,3 +808,95 @@ void CGHLSLRuntime::emitInitListOpaqueValues(CodeGenFunction &CGF, } } } + +std::optional CGHLSLRuntime::emitResourceArraySubscriptExpr( +const ArraySubscriptExpr *ArraySubsExpr, CodeGenFunction &CGF) { + assert(ArraySubsExpr->getType()->isHLSLR

[llvm-branch-commits] [libcxx] release/21.x: [libc++] Fix std::variant evaluating template arguments too eagerly (#151028) (PR #153064)

2025-08-11 Thread via llvm-branch-commits
https://github.com/llvmbot milestoned https://github.com/llvm/llvm-project/pull/153064 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/152454 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] release/21.x: [libc++] Fix std::variant evaluating template arguments too eagerly (#151028) (PR #153064)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: None (llvmbot) Changes Backport f5f582451e913581ef214b8b771a13d3912394d5 Requested by: @ldionne --- Full diff: https://github.com/llvm/llvm-project/pull/153064.diff 2 Files Affected: - (modified) libcxx/include/__type_traits/invoke.h

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ +// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s -check-prefixes=CHECK,DXIL +// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compute

[llvm-branch-commits] [libcxx] release/21.x: [libc++] Fix std::variant evaluating template arguments too eagerly (#151028) (PR #153064)

2025-08-11 Thread via llvm-branch-commits
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/153064 Backport f5f582451e913581ef214b8b771a13d3912394d5 Requested by: @ldionne >From bdb0752852d61a40951cb6152208fd2e2d313b25 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Mon, 11 Aug 2025 20:15:59 +0200 Subj

[llvm-branch-commits] [libcxx] release/21.x: [libc++] Fix std::variant evaluating template arguments too eagerly (#151028) (PR #153064)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @ldionne What do you think about merging this PR to the release branch? https://github.com/llvm/llvm-project/pull/153064 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ +// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s -check-prefixes=CHECK,DXIL +// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compute

[llvm-branch-commits] [llvm] [HLSL] Update DXIL resource metadata code to support resource arrays (PR #152254)

2025-08-11 Thread Joshua Batista via llvm-branch-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/152254 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ +// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compute \ +// RUN: -emit-llvm -dis

[llvm-branch-commits] [llvm] [HLSL] Update DXIL resource metadata code to support resource arrays (PR #152254)

2025-08-11 Thread Finn Plummer via llvm-branch-commits
https://github.com/inbelic approved this pull request. https://github.com/llvm/llvm-project/pull/152254 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ +// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s -check-prefixes=CHECK,DXIL +// RUN: %clang_cc1 -finclude-default-header -triple spirv-unknown-vulkan-compute

[llvm-branch-commits] [clang] release/21.x: [CMake][Release] Build with -ffat-lto-objects (#140381) (PR #151245)

2025-08-11 Thread Tom Stellard via llvm-branch-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/151245 >From ab1d1813b343c6f274beec751bcfef3b8e75ba7b Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 29 Jul 2025 15:33:49 -0700 Subject: [PATCH] [CMake][Release] Build with -ffat-lto-objects (#140381) Fixes #

[llvm-branch-commits] [flang] [flang][OpenMP] Move rewriting of min/max from Lower to Semantics (PR #153038)

2025-08-11 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah commented: Is this still tested by the old tests for the rewriting in flang/Lower? https://github.com/llvm/llvm-project/pull/153038 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/

[llvm-branch-commits] [flang] [flang][Evaluate] Pattern matching framework for evaluate::Expr (PR #153042)

2025-08-11 Thread Tom Eccles via llvm-branch-commits
https://github.com/tblah commented: This looks good at a glance, but I think we do need some upstream use for this before merging. Or at least a way of testing it. https://github.com/llvm/llvm-project/pull/153042 ___ llvm-branch-commits mailing list l

[llvm-branch-commits] [clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-11 Thread Helena Kotas via llvm-branch-commits
hekota wrote: Copying comment from the abandoned PR: @s-perron - when you come back from your vacation - do you have any thoughts on how to update the `CodeGenHLSL/convergence/global_array.hlsl`? With this change resource arrays are no longer initialized with a loop that calls the default con

[llvm-branch-commits] [llvm] release/21.x: PreISelIntrinsicLowering: Lower llvm.log to a loop if scalable vec arg (#129744) (PR #153046)

2025-08-11 Thread via llvm-branch-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Developer Policy](https://llvm.org/docs/DeveloperPol

[llvm-branch-commits] [llvm] release/21.x: PreISelIntrinsicLowering: Lower llvm.log to a loop if scalable vec arg (#129744) (PR #153046)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: None (llvmbot) Changes Backport 19ada02 Requested by: @arsenm --- Full diff: https://github.com/llvm/llvm-project/pull/153046.diff 3 Files Affected: - (modified) llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp (+2) - (modified

[llvm-branch-commits] [llvm] release/21.x: PreISelIntrinsicLowering: Lower llvm.log to a loop if scalable vec arg (#129744) (PR #153046)

2025-08-11 Thread via llvm-branch-commits
https://github.com/llvmbot milestoned https://github.com/llvm/llvm-project/pull/153046 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/21.x: PreISelIntrinsicLowering: Lower llvm.log to a loop if scalable vec arg (#129744) (PR #153046)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @arsenm What do you think about merging this PR to the release branch? https://github.com/llvm/llvm-project/pull/153046 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[llvm-branch-commits] [llvm] release/21.x: PreISelIntrinsicLowering: Lower llvm.log to a loop if scalable vec arg (#129744) (PR #153046)

2025-08-11 Thread via llvm-branch-commits
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/153046 Backport 19ada02 Requested by: @arsenm >From 9b7829e3d2b05e17c460ee9b3b969724d86fdac0 Mon Sep 17 00:00:00 2001 From: Stephen Long <63318318+stepl...@users.noreply.github.com> Date: Mon, 11 Aug 2025 12:04:28 -04

[llvm-branch-commits] [flang] [flang][Evaluate] Pattern matching framework for evaluate::Expr (PR #153042)

2025-08-11 Thread Krzysztof Parzyszek via llvm-branch-commits
kparzysz wrote: PR stack: - https://github.com/llvm/llvm-project/pull/153036 - https://github.com/llvm/llvm-project/pull/153037 - https://github.com/llvm/llvm-project/pull/153038 - https://github.com/llvm/llvm-project/pull/153042 (this PR) https://github.com/llvm/llvm-project/pull/153042 ___

[llvm-branch-commits] [flang] [flang][Evaluate] Pattern matching framework for evaluate::Expr (PR #153042)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-flang-semantics Author: Krzysztof Parzyszek (kparzysz) Changes Implement a framework to make it easier to detect if evaluate::Expr has certain structure. --- Full diff: https://github.com/llvm/llvm-project/pull/153042.diff 1 Files Affected: - (ad

[llvm-branch-commits] [flang] [flang][Evaluate] Pattern matching framework for evaluate::Expr (PR #153042)

2025-08-11 Thread Krzysztof Parzyszek via llvm-branch-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/153042 Implement a framework to make it easier to detect if evaluate::Expr has certain structure. >From ef35eeae708cb5f4e7782d857a0551a263edbbe6 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Fri, 8 Aug 20

[llvm-branch-commits] [llvm] [Dexter][NFC] Rename step -> step_in (PR #152716)

2025-08-11 Thread Orlando Cazalet-Hyams via llvm-branch-commits
https://github.com/OCHyams converted_to_draft https://github.com/llvm/llvm-project/pull/152716 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [flang][OpenMP] Move rewriting of min/max from Lower to Semantics (PR #153038)

2025-08-11 Thread Krzysztof Parzyszek via llvm-branch-commits
kparzysz wrote: PR stack: - https://github.com/llvm/llvm-project/pull/153036 - https://github.com/llvm/llvm-project/pull/153037 - https://github.com/llvm/llvm-project/pull/153038 (this PR) https://github.com/llvm/llvm-project/pull/153038 ___ llvm-branc

[llvm-branch-commits] [flang] [flang][Evaluate] Implement rewriting framework for evaluate::Expr (PR #153037)

2025-08-11 Thread Krzysztof Parzyszek via llvm-branch-commits
kparzysz wrote: PR stack: - https://github.com/llvm/llvm-project/pull/153036 - https://github.com/llvm/llvm-project/pull/153037 (this PR) - https://github.com/llvm/llvm-project/pull/153038 https://github.com/llvm/llvm-project/pull/153037 ___ llvm-branc

[llvm-branch-commits] [flang] [flang][OpenMP] Move rewriting of min/max from Lower to Semantics (PR #153038)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-flang-semantics Author: Krzysztof Parzyszek (kparzysz) Changes There semantic analysis of the ATOMIC construct will require additional rewriting (reassociation of certain expressions for user convenience), and that will be driven by diagnoses made in t

[llvm-branch-commits] [flang] [flang][OpenMP] Move rewriting of min/max from Lower to Semantics (PR #153038)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-flang-fir-hlfir Author: Krzysztof Parzyszek (kparzysz) Changes There semantic analysis of the ATOMIC construct will require additional rewriting (reassociation of certain expressions for user convenience), and that will be driven by diagnoses made in t

[llvm-branch-commits] [flang] [flang][Evaluate] Implement rewriting framework for evaluate::Expr (PR #153037)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-flang-semantics Author: Krzysztof Parzyszek (kparzysz) Changes The structure of evaluate::Expr is highly customized for the specific operation or entity that it represents. The different cases are expressed with different types, which makes the travers

[llvm-branch-commits] [flang] [flang][OpenMP] Move rewriting of min/max from Lower to Semantics (PR #153038)

2025-08-11 Thread Krzysztof Parzyszek via llvm-branch-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/153038 There semantic analysis of the ATOMIC construct will require additional rewriting (reassociation of certain expressions for user convenience), and that will be driven by diagnoses made in the semantic checks.

[llvm-branch-commits] [flang] [flang][Evaluate] Implement rewriting framework for evaluate::Expr (PR #153037)

2025-08-11 Thread Krzysztof Parzyszek via llvm-branch-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/153037 The structure of evaluate::Expr is highly customized for the specific operation or entity that it represents. The different cases are expressed with different types, which makes the traversal and modifications

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Mircea Trofin via llvm-branch-commits
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) { // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); + if (!ProfcheckDisableMetadataFixes) +KnownSet.insert(LLVMContext::MD_p

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
nikic wrote: You can probably achieve that just by adding a function call before the select (where the function is not known willreturn/nounwind). https://github.com/llvm/llvm-project/pull/152420 ___ llvm-branch-comm

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) { // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); + if (!ProfcheckDisableMetadataFixes) +KnownSet.insert(LLVMContext::MD_p

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Mircea Trofin via llvm-branch-commits
https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/152420 >From d35d9dfc2003d7fdf49802b2e0985a19ae7776f7 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Wed, 6 Aug 2025 17:43:35 -0700 Subject: [PATCH] [ir] MD_prof is not UB-implying --- llvm/lib/IR/Metadata.cpp

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Mircea Trofin via llvm-branch-commits
https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/152420 >From d35d9dfc2003d7fdf49802b2e0985a19ae7776f7 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Wed, 6 Aug 2025 17:43:35 -0700 Subject: [PATCH] [ir] MD_prof is not UB-implying --- llvm/lib/IR/Metadata.cpp

[llvm-branch-commits] [llvm] AMDGPU: Add tests for every mfma intrinsic v-to-a mapping (PR #153026)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes Make sure the MFMA VGPR to AGPR InstrMapping table is complete. I think I got everything, except the full cross product of input types with the mfma scale intrinsics. Also makes sure we have coverage

[llvm-branch-commits] [llvm] AMDGPU: Add tests for every mfma intrinsic v-to-a mapping (PR #153026)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153026 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Add test for mfma rewrite pass respecting optnone (PR #153025)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/153025.diff 1 Files Affected: - (modified) llvm/test/CodeGen/AMDGPU/rewrite-vgpr-mfma-to-agpr.ll (+35) ``diff diff --git a/llv

[llvm-branch-commits] [llvm] AMDGPU: Add test for mfma rewrite pass respecting optnone (PR #153025)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153025 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Add tests for every mfma intrinsic v-to-a mapping (PR #153026)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153026?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Add test for mfma rewrite pass respecting optnone (PR #153025)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153025?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Add tests for every mfma intrinsic v-to-a mapping (PR #153026)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153026 Make sure the MFMA VGPR to AGPR InstrMapping table is complete. I think I got everything, except the full cross product of input types with the mfma scale intrinsics. Also makes sure we have coverage for smfmac an

[llvm-branch-commits] [llvm] AMDGPU: Add test for mfma rewrite pass respecting optnone (PR #153025)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153025 None >From 7d33395319bb43b093d854795faaed63039103aa Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 11 Aug 2025 19:05:44 +0900 Subject: [PATCH] AMDGPU: Add test for mfma rewrite pass respecting optnone

[llvm-branch-commits] [llvm] AMDGPU: Add statistic for number of MFMAs moved to AGPR form (PR #153024)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/153024.diff 1 Files Affected: - (modified) llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp (+5) ``diff diff --git a/llvm/

[llvm-branch-commits] [llvm] AMDGPU: Add statistic for number of MFMAs moved to AGPR form (PR #153024)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153024?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Add statistic for number of MFMAs moved to AGPR form (PR #153024)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153024 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Add statistic for number of MFMAs moved to AGPR form (PR #153024)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153024 None >From 0dff2435e57be1d62ba79aa385e7d023c5c975de Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 11 Aug 2025 19:00:54 +0900 Subject: [PATCH] AMDGPU: Add statistic for number of MFMAs moved to AGPR fo

[llvm-branch-commits] [llvm] AMDGPU: Handle V->A MFMA copy from case with immediate src2 (PR #153023)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes Handle a special case for copies from AGPR VGPR on the MFMA inputs. If the "input" is really a subregister def, we will not see the usual copy to VGPR for src2, only the read of the subregister def.

[llvm-branch-commits] [llvm] AMDGPU: Handle V->A MFMA copy from case with immediate src2 (PR #153023)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153023?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Handle V->A MFMA copy from case with immediate src2 (PR #153023)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153023 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Mircea Trofin via llvm-branch-commits
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) { // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); + if (!ProfcheckDisableMetadataFixes) +KnownSet.insert(LLVMContext::MD_p

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Mircea Trofin via llvm-branch-commits
mtrofin wrote: It additionally needs `!SafetyInfo->isGuaranteedToExecute)` (see LICM.cpp - `hoist`, right after the `ORE->emit` bit) iiuc the indirectbr is a pretty easy way to ensure that (I copied the test from sinking.ll) https://github.com/llvm/llvm-proj

[llvm-branch-commits] [llvm] AMDGPU: Handle V->A MFMA copy from case with immediate src2 (PR #153023)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153023 Handle a special case for copies from AGPR VGPR on the MFMA inputs. If the "input" is really a subregister def, we will not see the usual copy to VGPR for src2, only the read of the subregister def. Not sure if th

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA fed from AGPR copy (PR #153022)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes Previously we handled the inverse situation only. --- Patch is 34.51 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/153022.diff 3 Files Affected: - (

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA fed from AGPR copy (PR #153022)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153022 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA fed from AGPR copy (PR #153022)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153022?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA fed from AGPR copy (PR #153022)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153022 Previously we handled the inverse situation only. >From 431cefae4d5c7923ac6721ce86efd3de736b75af Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 11 Aug 2025 10:47:44 +0900 Subject: [PATCH] AMDGPU: Handl

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for mfma rewrite with phi (PR #153021)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes The first case currently works as expected, but defends against a regression I nearly introduced in a later patch. The loop case does not work as expected yet. --- Full diff: https://github.com/llvm

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for mfma rewrite with phi (PR #153021)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153021 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for vgpr fma with copied-from AGPR (PR #153020)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes We currently handle the case where an MFMA is copied to an AGPR, but not the case where the MFMA is copying from an AGPR. --- Patch is 34.43 KiB, truncated to 20.00 KiB below, full version: https:

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for vgpr fma with copied-from AGPR (PR #153020)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153020 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for mfma rewrite with phi (PR #153021)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153021?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for vgpr fma with copied-from AGPR (PR #153020)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153020?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for mfma rewrite with phi (PR #153021)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153021 The first case currently works as expected, but defends against a regression I nearly introduced in a later patch. The loop case does not work as expected yet. >From 814f781a353995c6bdd176c3c6d5effa1af0d611 Mon S

[llvm-branch-commits] [llvm] AMDGPU: Add baseline test for vgpr fma with copied-from AGPR (PR #153020)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153020 We currently handle the case where an MFMA is copied to an AGPR, but not the case where the MFMA is copying from an AGPR. >From 5ae2e085262a093a3dd0e5e5033c2a1a9991f986 Mon Sep 17 00:00:00 2001 From: Matt Arsenau

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA to AGPR with subregister copies (PR #153019)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes This should address the case where the result isn't fully used, resulting in partial copy bundles from the MFMA result. --- Patch is 56.45 KiB, truncated to 20.00 KiB below, full version: https://

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA to AGPR with subregister copies (PR #153019)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153019 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA to AGPR with subregister copies (PR #153019)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153019?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMA to AGPR with subregister copies (PR #153019)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153019 This should address the case where the result isn't fully used, resulting in partial copy bundles from the MFMA result. >From 395636191501a647f113882ced334912ce8df2d7 Mon Sep 17 00:00:00 2001 From: Matt Arsenault

[llvm-branch-commits] [llvm] AMDGPU: Add some baseline test for mfma rewrite with subregister copies (PR #153018)

2025-08-11 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) Changes Currently only cases rooted at a full copy of an MFMA result are handled. Prepare to relax that by testing more intricate subregister usage. Currently only full copies are handled, add some tests to

[llvm-branch-commits] [llvm] AMDGPU: Add some baseline test for mfma rewrite with subregister copies (PR #153018)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/153018?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] AMDGPU: Add some baseline test for mfma rewrite with subregister copies (PR #153018)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/153018 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Add some baseline test for mfma rewrite with subregister copies (PR #153018)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/153018 Currently only cases rooted at a full copy of an MFMA result are handled. Prepare to relax that by testing more intricate subregister usage. Currently only full copies are handled, add some tests to help work tow

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,30 @@ +! Test declare target to interaction with an allocatable with a non-default skatrak wrote: ```suggestion ! Test `declare target to` interaction with an allocatable with a non-default ``` https://github.com/llvm/llvm-project/pull/119589 __

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,52 @@ +! Test that checks an allocatable array can be marked declare target to and +! functions without issue. +! REQUIRES: flang, amdgpu + +! RUN: %libomptarget-compile-fortran-run-and-check-generic +module test +implicit none +integer, allocatable, dimension(:

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,52 @@ +! Test that checks an allocatable array can be marked declare target to and skatrak wrote: ```suggestion ! Test that checks an allocatable array can be marked `declare target to` and ``` https://github.com/llvm/llvm-project/pull/119589

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -5150,11 +5213,17 @@ handleDeclareTargetMapVar(MapInfoData &mapData, for (llvm::User *user : userVec) { if (auto *insn = dyn_cast(user)) { if (insn->getFunction() == func) { -builder.SetCurrentDebugLocation(insn->getDebugLoc()); -

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,38 @@ +// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s + +// This tests the replacement of operations for declare target to with the +// generated declare target to global variable inside of target op regions when +// lowering to IR for device. Unfortunately as

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -275,9 +275,21 @@ class MapInfoFinalizationPass return mapTypeFlag; mapFlags flags = mapFlags::OMP_MAP_TO | - (mapFlags(mapTypeFlag) & - (mapFlags::OMP_MAP_IMPLICIT | mapFlags::OMP_MAP_CLOSE | - mapFla

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -3664,6 +3690,30 @@ struct MapInfoData : MapInfosTy { MapInfosTy::append(CurInfo); } }; + +enum class TargetDirective : uint32_t { + None = 0, + Target = 1, + TargetData = 2, + TargetEnterData = 3, + TargetExitData = 4, + TargetUpdate = 5 +}; ska

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/119589 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -0,0 +1,36 @@ +! Test declare target to interaction with update from skatrak wrote: ```suggestion ! Test `declare target to` interaction with `target update from` ``` https://github.com/llvm/llvm-project/pull/119589 ___

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -4358,8 +4411,15 @@ static void processMapMembersWithParent( mapFlag &= ~llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TARGET_PARAM; mapFlag |= llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_MEMBER_OF; ompBuilder.setCorrectMemberOfFlag(mapFlag, memberOfFlag); -

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
@@ -3566,8 +3568,12 @@ getDeclareTargetRefPtrSuffix(LLVM::GlobalOp globalOp, return suffix; } -static bool isDeclareTargetLink(mlir::Value value) { - if (auto addressOfOp = value.getDefiningOp()) { +static bool isDeclareTargetLink(Value value) { + Operation *op = value.get

[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

2025-08-11 Thread Sergio Afonso via llvm-branch-commits
https://github.com/skatrak commented: Thank you Andrew, I only have some minor comments. https://github.com/llvm/llvm-project/pull/119589 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMAs with immediate src2 (PR #150566)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/150566 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] AMDGPU: Handle rewriting VGPR MFMAs with immediate src2 (PR #150566)

2025-08-11 Thread Matt Arsenault via llvm-branch-commits
arsenm wrote: Reopened as https://github.com/llvm/llvm-project/pull/153016 to workaround graphite reparenting issue https://github.com/llvm/llvm-project/pull/150566 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists

  1   2   >