[clang] 189310a - [AMDGPU] Allow -amdgpu-unsafe-fp-atomics to ignore denorm mode

2021-04-08 Thread Stanislav Mekhanoshin via cfe-commits
Author: Stanislav Mekhanoshin Date: 2021-04-08T12:46:36-07:00 New Revision: 189310a140fa1c33f8f4838560f567bab9e99245 URL: https://github.com/llvm/llvm-project/commit/189310a140fa1c33f8f4838560f567bab9e99245 DIFF: https://github.com/llvm/llvm-project/commit/189310a140fa1c33f8f4838560f567bab9e992

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-16 Thread Stanislav Mekhanoshin via cfe-commits
@@ -224,8 +224,8 @@ TARGET_BUILTIN(__builtin_amdgcn_frexp_exph, "sh", "nc", "16-bit-insts") TARGET_BUILTIN(__builtin_amdgcn_fracth, "hh", "nc", "16-bit-insts") TARGET_BUILTIN(__builtin_amdgcn_classh, "bhi", "nc", "16-bit-insts") TARGET_BUILTIN(__builtin_amdgcn_s_memrealtime, "

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-18 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/6] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-18 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/7] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-21 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/112447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-21 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/7] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
@@ -102,20 +102,66 @@ void test_s_dcache_wb() __builtin_amdgcn_s_dcache_wb(); } -// CHECK-LABEL: @test_mov_dpp +// CHECK-LABEL: @test_mov_dpp_int // CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %src, i32 0, i32 0, i32 0, i1 false) -void test_mov_

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
@@ -102,20 +102,66 @@ void test_s_dcache_wb() __builtin_amdgcn_s_dcache_wb(); } -// CHECK-LABEL: @test_mov_dpp +// CHECK-LABEL: @test_mov_dpp_int // CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %src, i32 0, i32 0, i32 0, i1 false) -void test_mov_

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-16 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/4] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-16 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: > This needs some sema type restrictions to make sure it's something sensible Added. https://github.com/llvm/llvm-project/pull/112447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/5] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
@@ -7,3 +7,37 @@ void test_gfx9_fmed3h(global half *out, half a, half b, half c) { *out = __builtin_amdgcn_fmed3h(a, b, c); // expected-error {{'__builtin_amdgcn_fmed3h' needs target feature gfx9-insts}} } + +void test_mov_dpp(global int* out, int src, int i) +{ + *out = __

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
@@ -102,20 +102,66 @@ void test_s_dcache_wb() __builtin_amdgcn_s_dcache_wb(); } -// CHECK-LABEL: @test_mov_dpp +// CHECK-LABEL: @test_mov_dpp_int // CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.update.dpp.i32(i32 poison, i32 %src, i32 0, i32 0, i32 0, i1 false) -void test_mov_

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-17 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/6] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-18 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/6] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-18 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: I actually wish a better way to have overloaded builtins in clang. I do not believe any user of these builtins is expecting that a wide integer will be silently truncated, and any fp will go through fptosi and backwards after, like we do now. We have much more builtins like tha

[clang] [AMDGPU] Relax __builtin_amdgcn_update_dpp sema check (PR #113341)

2024-10-22 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/113341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Relax __builtin_amdgcn_update_dpp sema check (PR #113341)

2024-10-22 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/113341 Recent change applied too strict check for old and src operands match. These shall be compatible, but not necessarily exactly the same. >From 01e8c4224a1a0b8e1067c087f3a5e1283566f80a Mon Sep 17 00:00:00 2001 F

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp8 (PR #113610)

2024-10-29 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: It does not really work w/o https://github.com/llvm/llvm-project/pull/113500 though. https://github.com/llvm/llvm-project/pull/113610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp8 (PR #113610)

2024-10-24 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/113610 The same handling as for __builtin_amdgcn_mov_dpp. >From edda0e600abeabff4d44e8b0b897104efacc8f98 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Thu, 24 Oct 2024 11:31:52 -0700 Subject: [PATCH] [AM

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -345,6 +345,15 @@ extern char &AMDGPUPrintfRuntimeBindingID; void initializeAMDGPUResourceUsageAnalysisPass(PassRegistry &); extern char &AMDGPUResourceUsageAnalysisID; +struct AMDGPUExpandPseudoIntrinsicsPass rampitec wrote: The pass isn't needed now? ht

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec edited https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec commented: In general LTGM. https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1024,6 +1024,16 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1024,6 +1024,16 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics, start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-11-01 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: This is really just a constant folding rather than a new pass. If the concern is that InstCombine works too late that is possible to add an earlier invocation. https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing l

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp8 (PR #113610)

2024-10-31 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/113610 >From edda0e600abeabff4d44e8b0b897104efacc8f98 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Thu, 24 Oct 2024 11:31:52 -0700 Subject: [PATCH 1/2] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp8 (PR #113610)

2024-10-31 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/113610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp8 (PR #113610)

2024-10-25 Thread Stanislav Mekhanoshin via cfe-commits
@@ -152,6 +115,44 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, return false; } +bool SemaAMDGPU::CheckMovDPPFunctionCall(CallExpr *TheCall, unsigned NumArgs, rampitec wrote: Done https://github.com/llvm/llvm-project/pull/113610 _

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp8 (PR #113610)

2024-10-25 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/113610 >From edda0e600abeabff4d44e8b0b897104efacc8f98 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Thu, 24 Oct 2024 11:31:52 -0700 Subject: [PATCH 1/2] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-15 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: Note, there is also dpp8 with the similar problem. But dpp8 is not properly handled even if intrinsic is used with a 64-bit type (i.e. not split into 2 separate 32-bit dpp ops). This would be a nice to have, but not absolutely necessary like here, because there are no 64-bit re

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-15 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/3] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-15 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/112447 We need to support 64-bit data types (intrinsics do support it). We are also silently converting FP to integer argument now, also fixed. >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-15 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/112447 >From 761b3e21748dd3a7b53cd0ead745943213317eb4 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Tue, 15 Oct 2024 15:23:28 -0700 Subject: [PATCH 1/2] [AMDGPU] Allow overload of __builtin_amdgcn_mov/up

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-06 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1,6 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -o - %s | FileCheck -check-prefixes=GFX9 %s ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 -o - %s | File

[clang] [llvm] [AMDGPU] Introduce a new generic target `gfx9-4-generic` (PR #115190)

2024-11-06 Thread Stanislav Mekhanoshin via cfe-commits
@@ -1,5 +1,6 @@ # NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 # RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx942 -start-before=machine-scheduler -verify-misched -o - %s | FileCheck -check-prefix=GCN %s +# RUN: llc -mtriple

[clang] [llvm] [AMDGPU] modify named barrier builtins and intrinsics (PR #114550)

2024-11-06 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. It's the same code already reviewed downstream. LGTM. https://github.com/llvm/llvm-project/pull/114550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/122169 It was superceeded by the emitBuiltinWithOneOverloadedType() some time ago. >From 2b14fb00e32db739ab8f3962fe5ad77e1df3ffda Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Wed, 8 Jan 2025 12:49:18 -0

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: * **#122169** https://app.graphite.dev/github/pr/llvm/llvm-project/122169?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/122

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec ready_for_review https://github.com/llvm/llvm-project/pull/122169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-08 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/122169 >From cf1e4319bc0b9799d1e20b87a3aadd7cb038b736 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Wed, 8 Jan 2025 12:49:18 -0800 Subject: [PATCH] Drop emitQuaternaryBuiltin from clang It was superceede

[clang] Drop emitQuaternaryBuiltin from clang (PR #122169)

2025-01-09 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/122169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AMDGPU] Use 32-bit index for SWMMAC builtins (PR #129101)

2025-02-27 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3