[llvm] [clang] [AMDGPU] Do not emit `V_DOT2C_F32_F16_e32` on GFX12 (PR #78709)

2024-01-19 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/78709 That instruction is not supported on GFX12. Added a testcase which previously crashed without this change. >From b212d63828ae87b8e40f9d6de7622bc7a14ce48f Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 30 Oc

[llvm] [clang] [AMDGPU] Remove gws feature from GFX12 (PR #78711)

2024-01-19 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/78711 This was already done for LLVM. This patch just updates the Clang builtin handling to match. >From 8ec83bbc08c6a364efda3724d5886dbd568f956f Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 19 Jan 2024 13:34:3

[libc] [compiler-rt] [flang] [lld] [llvm] [clang] [lldb] [clang-tools-extra] [libcxx] [AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (PR #78414)

2024-01-19 Thread Jay Foad via cfe-commits
jayfoad wrote: Can you add a GFX12 RUN line to clang/test/CodeGenOpenCL/builtins-amdgcn-fp8.cl? That will probably require adding "fp8-conversion-insts" to the GFX12 part of TargetParser.cpp. You can do this in a separate patch if you want. https://github.com/llvm/llvm-project/pull/78414

[llvm] [clang] [AMDGPU] Do not emit `V_DOT2C_F32_F16_e32` on GFX12 (PR #78709)

2024-01-19 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/78709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Remove gws feature from GFX12 (PR #78711)

2024-01-19 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/78711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-19 Thread Jay Foad via cfe-commits
@@ -0,0 +1,105 @@ +// REQUIRES: amdgpu-registered-target jayfoad wrote: Maybe just add these to `test/CodeGenOpenCL/builtins-amdgcn-gfx12-err.cl` instead of a new file? https://github.com/llvm/llvm-project/pull/78729

[lldb] [llvm] [mlir] [openmp] [libcxx] [flang] [clang] [clang-tools-extra] [compiler-rt] [lld] [libc] AMDGPU: Do not generate non-temporal hint when Load_Tr intrinsic did not specify it (PR #79104)

2024-01-23 Thread Jay Foad via cfe-commits
@@ -1348,6 +1348,14 @@ bool SITargetLowering::getTgtMemIntrinsic(IntrinsicInfo &Info, MachineMemOperand::MOVolatile; return true; } + case Intrinsic::amdgcn_global_load_tr: { jayfoad wrote: This case should also be handled in getAdrMo

[libcxx] [lld] [libc] [lldb] [clang-tools-extra] [clang] [openmp] [compiler-rt] [llvm] [flang] [mlir] AMDGPU: Do not generate non-temporal hint when Load_Tr intrinsic did not specify it (PR #79104)

2024-01-23 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/79104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Fix image intrinsic optimizer on loads from different resources (PR #69355)

2023-10-18 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/69355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [AMDGPU] Fix image intrinsic optimizer on loads from different resources (PR #69355)

2023-10-18 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/69355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [AMDGPU] Make S_MOV_B64_IMM_PSEUDO foldable (PR #69483)

2023-10-18 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. https://github.com/llvm/llvm-project/pull/69483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Make S_MOV_B64_IMM_PSEUDO foldable (PR #69483)

2023-10-18 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. https://github.com/llvm/llvm-project/pull/69483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] make w32i16/w32f16 legal (PR #70484)

2023-10-27 Thread Jay Foad via cfe-commits
jayfoad wrote: > [AMDGPU] make w32i16/w32f16 Typos "v32" https://github.com/llvm/llvm-project/pull/70484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] d933ade - [APInt] Stop using soft-deprecated constructors and methods in clang. NFC.

2021-10-04 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-10-04T09:38:11+01:00 New Revision: d933adeaca7b9c2aa27e7ca35f7dd4ccc6b5985d URL: https://github.com/llvm/llvm-project/commit/d933adeaca7b9c2aa27e7ca35f7dd4ccc6b5985d DIFF: https://github.com/llvm/llvm-project/commit/d933adeaca7b9c2aa27e7ca35f7dd4ccc6b5985d.diff LOG:

[clang] 566690b - [APFloat] Remove BitWidth argument from getAllOnesValue

2021-10-04 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-10-04T11:32:16+01:00 New Revision: 566690b067c8175314fa657b899c99bccf96821c URL: https://github.com/llvm/llvm-project/commit/566690b067c8175314fa657b899c99bccf96821c DIFF: https://github.com/llvm/llvm-project/commit/566690b067c8175314fa657b899c99bccf96821c.diff LOG:

[clang] 157473a - [IR] Simplify createReplacementInstr

2021-06-23 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-06-23T10:47:43+01:00 New Revision: 157473a58f02b8f2ad12ecbaaa1af32d0342257b URL: https://github.com/llvm/llvm-project/commit/157473a58f02b8f2ad12ecbaaa1af32d0342257b DIFF: https://github.com/llvm/llvm-project/commit/157473a58f02b8f2ad12ecbaaa1af32d0342257b.diff LOG:

[clang] 1b75892 - [IR] Merge createReplacementInstr into ConstantExpr::getAsInstruction

2021-10-29 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-10-29T15:02:58+01:00 New Revision: 1b758925adf6d78c89c70d2673689695e90fa993 URL: https://github.com/llvm/llvm-project/commit/1b758925adf6d78c89c70d2673689695e90fa993 DIFF: https://github.com/llvm/llvm-project/commit/1b758925adf6d78c89c70d2673689695e90fa993.diff LOG:

[clang] fc28f60 - [AMDGPU] Restore the s_memtime instruction in gfx1030

2021-03-05 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-03-05T20:19:11Z New Revision: fc28f600e558c1344618bda149a068d6162b6f0b URL: https://github.com/llvm/llvm-project/commit/fc28f600e558c1344618bda149a068d6162b6f0b DIFF: https://github.com/llvm/llvm-project/commit/fc28f600e558c1344618bda149a068d6162b6f0b.diff LOG: [AMD

[clang] 99682bc - Revert "Revert "[AMDGPU] Restore the s_memtime instruction in gfx1030""

2021-03-06 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-03-06T09:00:01Z New Revision: 99682bc039dfec3e30e6e2b97b4b663f412e0d71 URL: https://github.com/llvm/llvm-project/commit/99682bc039dfec3e30e6e2b97b4b663f412e0d71 DIFF: https://github.com/llvm/llvm-project/commit/99682bc039dfec3e30e6e2b97b4b663f412e0d71.diff LOG: Reve

[clang] 2774bad - [AMDGPU] Change llvm.amdgcn.image.bvh.intersect.ray to take vec3 args

2021-12-04 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-12-04T10:32:11Z New Revision: 2774bad1124215571ab154afcb5478c78cf46344 URL: https://github.com/llvm/llvm-project/commit/2774bad1124215571ab154afcb5478c78cf46344 DIFF: https://github.com/llvm/llvm-project/commit/2774bad1124215571ab154afcb5478c78cf46344.diff LOG: [AMD

[clang-tools-extra] [SelectionDAG] Flags are dropped when creating a new FMUL (PR #66701)

2023-09-21 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/66701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SelectionDAG] Flags are dropped when creating a new FMUL (PR #66701)

2023-09-21 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/66701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add GFX11.5 s_singleuse_vdst instruction (PR #67536)

2023-09-29 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/67536 >From e0571e8b4712e39678218f02d7f5d68755bc85f9 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Wed, 27 Sep 2023 11:01:17 +0100 Subject: [PATCH] [AMDGPU] Add GFX11.5 s_singleuse_vdst instruction --- llvm/lib/Targe

[clang] [AMDGPU] Add GFX11.5 s_singleuse_vdst instruction (PR #67536)

2023-09-29 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/67536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)

2023-10-03 Thread Jay Foad via cfe-commits
jayfoad wrote: I've just tested this on 1 graphics shaders and it seems to make no difference at all. I tried gfx900 and gfx1100. Can anyone else from the graphics team confirm this? https://github.com/llvm/llvm-project/pull/67878 ___ cfe-commits

[clang] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)

2023-10-03 Thread Jay Foad via cfe-commits
jayfoad wrote: I've just tested this on 1 graphics shaders and it seems to make no difference at all. I tried gfx900 and gfx1100. Can anyone else from the graphics team confirm this? https://github.com/llvm/llvm-project/pull/67878 ___ cfe-commits

[libunwind] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)

2023-10-05 Thread Jay Foad via cfe-commits
jayfoad wrote: > > > I've just tested this on 1 graphics shaders and it seems to make no > > > difference at all. I tried gfx900 and gfx1100. Can anyone else from the > > > graphics team confirm this? > > > > > > I can confirm no difference on gfx1102 > > gfx11 is the same as gfx10, it j

[libunwind] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)

2023-10-05 Thread Jay Foad via cfe-commits
jayfoad wrote: I've taken another look at this. The patch does not show any benefit from running another `SIFoldOperands` pass _after_ `SIShrinkInstructions` per se; you get exactly the same results (modulo a couple of add instructions that have their operands commuted differently) if you put

[clang] [AMDGPU] Add another SIFoldOperands instance after shrink (PR #67878)

2023-10-05 Thread Jay Foad via cfe-commits
jayfoad wrote: I've taken another look at this. The patch does not show any benefit from running another `SIFoldOperands` pass _after_ `SIShrinkInstructions` per se; you get exactly the same results (modulo a couple of add instructions that have their operands commuted differently) if you put

[clang-tools-extra] [Legalizer] Expand fmaximum and fminimum (PR #67301)

2023-10-10 Thread Jay Foad via cfe-commits
@@ -8177,6 +8177,64 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, jayfoad wrote: > Can MIR be valid input for legalizers? No, sorry, please ignore that part.

[clang] [Legalizer] Expand fmaximum and fminimum (PR #67301)

2023-10-10 Thread Jay Foad via cfe-commits
@@ -8177,6 +8177,64 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node, return SDValue(); } +SDValue TargetLowering::expandFMINIMUM_FMAXIMUM(SDNode *N, jayfoad wrote: > Can MIR be valid input for legalizers? No, sorry, please ignore that part.

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/65729 >From 66129acffd34a4b0f2c8a956d88212ed2ee30946 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 8 Sep 2023 10:09:21 +0100 Subject: [PATCH] Clean up strange uses of getAnalysisIfAvailable After a pass calls add

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/65729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/65729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
jayfoad wrote: > I guess I don't know how pull requests and reviewing works in github. I > actually added 3 comments on this patch a several days (or weeks) ago. But > turns out that they were "pending" because I had only "started review" and > not found the place to "submit review". For that

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
@@ -3280,7 +3280,7 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass { if (skipFunction(F)) return false; -auto *LIWP = getAnalysisIfAvailable(); +auto &LIWP = getAnalysis(); jayfoad wrote: I prefer not to leave it as is - I think eith

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
@@ -261,7 +261,7 @@ bool VirtRegRewriter::runOnMachineFunction(MachineFunction &fn) { Indexes = &getAnalysis(); LIS = &getAnalysis(); VRM = &getAnalysis(); - DebugVars = getAnalysisIfAvailable(); + DebugVars = &getAnalysis(); jayfoad wrote: Thanks! Fi

[clang-tools-extra] Clean up strange uses of getAnalysisIfAvailable (PR #65729)

2023-10-11 Thread Jay Foad via cfe-commits
@@ -935,7 +935,7 @@ bool AArch64ConditionalCompares::runOnMachineFunction(MachineFunction &MF) { SchedModel = MF.getSubtarget().getSchedModel(); MRI = &MF.getRegInfo(); DomTree = &getAnalysis(); - Loops = getAnalysisIfAvailable(); + Loops = &getAnalysis();

[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

2023-09-12 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/65193: >From 0da34437a4ec6604d27808a020f56c6cf3615b21 Mon Sep 17 00:00:00 2001 From: Sheng Date: Wed, 30 Aug 2023 11:44:23 +0800 Subject: [PATCH] [clang][Sema] Fix a bug when instantiating a lambda with requires claus

[clang] 92542f2 - [AMDGPU] Add targets gfx1150 and gfx1151

2023-07-17 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2023-07-17T13:06:12+01:00 New Revision: 92542f2a400024e8a878242afe8231e17df345e5 URL: https://github.com/llvm/llvm-project/commit/92542f2a400024e8a878242afe8231e17df345e5 DIFF: https://github.com/llvm/llvm-project/commit/92542f2a400024e8a878242afe8231e17df345e5.diff LOG:

[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-16 Thread Jay Foad via cfe-commits
@@ -157,6 +157,27 @@ static uint32_t getLit16Encoding(uint16_t Val, const MCSubtargetInfo &STI) { return 255; } +static uint32_t getLitBF16Encoding(uint16_t Val) { + uint16_t IntImm = getIntInlineImmEncoding(static_cast(Val)); + if (IntImm != 0) +return IntImm; + + /

[clang] [llvm] [AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-16 Thread Jay Foad via cfe-commits
@@ -157,6 +157,27 @@ static uint32_t getLit16Encoding(uint16_t Val, const MCSubtargetInfo &STI) { return 255; } +static uint32_t getLitBF16Encoding(uint16_t Val) { + uint16_t IntImm = getIntInlineImmEncoding(static_cast(Val)); + if (IntImm != 0) +return IntImm; + + /

[clang] [libc] [llvm] AMDGPU: Add a subtarget feature for fine-grained remote memory support (PR #96442)

2024-07-04 Thread Jay Foad via cfe-commits
@@ -14,13 +14,14 @@ #define LLVM_CODEGEN_MACHINEBRANCHPROBABILITYINFO_H #include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachinePassManager.h" #include "llvm/Pass.h" #include "llvm/Support/BranchProbability.h" namespace llvm { -class MachineBranchProb

[clang] [lld] [llvm] [mlir] [NFC][IWYU] Update Support library with IWYU. (PR #102707)

2024-08-12 Thread Jay Foad via cfe-commits
jayfoad wrote: > > Did you know that LLVM intentionally does not follow IWYU and favors > > forward declarations: > > https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible > > Yes, but I actually do not see what part of the mentioned standard' section > conflicts with the c

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-04-05 Thread Jay Foad via cfe-commits
jayfoad wrote: Can you add at least one test for a VMEM (flat or scratch or global or buffer or image) atomic without return? That should use vscnt on GFX10. Apart from that the SIInsertWaitcnts.cpp and tests look good to me. I have not reviewed the clang parts but it looks like @Pierre-vh app

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-04-10 Thread Jay Foad via cfe-commits
jayfoad wrote: No further comments. https://github.com/llvm/llvm-project/pull/79236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [llvm] [AMDGPU] Add a new target gfx1152 (PR #94534)

2024-06-06 Thread Jay Foad via cfe-commits
@@ -1534,6 +1534,12 @@ def FeatureISAVersion11_5_1 : FeatureSet< FeatureVGPRSingleUseHintInsts, Feature1_5xVGPRs])>; +def FeatureISAVersion11_5_2 : FeatureSet< jayfoad wrote: I don't have a good answer to this except "it's what we normally do". Othe

[clang] [libclc] [llvm] [AMDGPU] Add a new target gfx1152 (PR #94534)

2024-06-06 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM. Could also update `flang/cmake/modules/AddFlangOffloadRuntime.cmake` but I don't really know if it's our responsibility to update Flang. https://github.com/llvm/llvm-project/pull/94534 ___

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-06 Thread Jay Foad via cfe-commits
jayfoad wrote: Is there really a good use case for this? Can you use regular stores to addrspace(7) instead? @krzysz00 Also, do you really need a separate builtin for every legal type, or is there some way they can be type-overloaded? https://github.com/llvm/llvm-project/pull/94576 __

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-06 Thread Jay Foad via cfe-commits
@@ -6,21 +6,21 @@ __attribute__((global)) void kernel(int *out) { int i = 0; - out[i++] = threadIdx.x; // CHECK: call noundef i32 @llvm.nvvm.read.ptx.sreg.tid.x() - out[i++] = threadIdx.y; // CHECK: call noundef i32 @llvm.nvvm.read.ptx.sreg.tid.y() - out[i++] = threadIdx

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-06 Thread Jay Foad via cfe-commits
@@ -6,21 +6,21 @@ __attribute__((global)) void kernel(int *out) { int i = 0; - out[i++] = threadIdx.x; // CHECK: call noundef i32 @llvm.nvvm.read.ptx.sreg.tid.x() - out[i++] = threadIdx.y; // CHECK: call noundef i32 @llvm.nvvm.read.ptx.sreg.tid.y() - out[i++] = threadIdx

[clang] [flang] [libclc] [llvm] [AMDGPU] Add a new target gfx1152 (PR #94534)

2024-06-06 Thread Jay Foad via cfe-commits
@@ -785,6 +785,7 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX1200 = 0x048, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X49 = 0x049, EF_AMDGPU_MACH_AMDGCN_GFX1151 = 0x04a, + EF_AMDGPU_MACH_AMDGCN_GFX1152 = 0x055, jayfoad wrote: This table

[clang] fixup cuda-builtin-vars.cu broken in IntrRange change (PR #94639)

2024-06-06 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. Works for me. https://github.com/llvm/llvm-project/pull/94639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [lld] [lldb] [llvm] [mlir] [openmp] [llvm-project] Fix typo "seperate" (PR #95373)

2024-06-13 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/95373 None >From 6d326a96d2651f8836b29ff1e3edef022f41549e Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 13 Jun 2024 09:46:48 +0100 Subject: [PATCH] [llvm-project] Fix typo "seperate" --- clang-tools-extra/clang

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [lld] [lldb] [llvm] [mlir] [openmp] [llvm-project] Fix typo "seperate" (PR #95373)

2024-06-13 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/95373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Debug Info] Fix debug info ptr to ptr test (PR #95637)

2024-06-15 Thread Jay Foad via cfe-commits
jayfoad wrote: I'll merge to fix the build. https://github.com/llvm/llvm-project/pull/95637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Debug Info] Fix debug info ptr to ptr test (PR #95637)

2024-06-15 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/95637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-31 Thread Jay Foad via cfe-commits
https://github.com/jayfoad edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-31 Thread Jay Foad via cfe-commits
@@ -5496,6 +5496,9 @@ const char* AMDGPUTargetLowering::getTargetNodeName(unsigned Opcode) const { NODE_NAME_CASE(LDS) NODE_NAME_CASE(FPTRUNC_ROUND_UPWARD) NODE_NAME_CASE(FPTRUNC_ROUND_DOWNWARD) + NODE_NAME_CASE(READLANE) + NODE_NAME_CASE(READFIRSTLANE) ---

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-31 Thread Jay Foad via cfe-commits
@@ -5496,6 +5496,9 @@ const char* AMDGPUTargetLowering::getTargetNodeName(unsigned Opcode) const { NODE_NAME_CASE(LDS) NODE_NAME_CASE(FPTRUNC_ROUND_UPWARD) NODE_NAME_CASE(FPTRUNC_ROUND_DOWNWARD) + NODE_NAME_CASE(READLANE) + NODE_NAME_CASE(READFIRSTLANE) + NODE_NAME_CA

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-31 Thread Jay Foad via cfe-commits
https://github.com/jayfoad commented: Does this need IR autoupgrade? https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-31 Thread Jay Foad via cfe-commits
jayfoad wrote: There is a latent problem to do with convergence. If you add a new test case like this: ```diff diff --git a/llvm/test/CodeGen/AMDGPU/convergence-tokens.ll b/llvm/test/CodeGen/AMDGPU/convergence-tokens.ll index 238f6ab39e83..22995083293d 100644 --- a/llvm/test/CodeGen/AMDGPU/conv

[clang] [llvm] [AMDGPU][WIP] Add support for i64/f64 readlane, writelane and readfirstlane operations. (PR #89217)

2024-04-22 Thread Jay Foad via cfe-commits
jayfoad wrote: Previous attempts: * https://reviews.llvm.org/D84639 * https://reviews.llvm.org/D86154 * https://reviews.llvm.org/D147732 * #87334 https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-04-30 Thread Jay Foad via cfe-commits
jayfoad wrote: AMDGPU changes are fine. https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Compiler messages on HIP SDK for Windows (PR #97668)

2024-07-09 Thread Jay Foad via cfe-commits
jayfoad wrote: > Compiler messages on HIP SDK for Windows Please rewrite this to say what the patch does or what problem it fixes. https://github.com/llvm/llvm-project/pull/97668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-09 Thread Jay Foad via cfe-commits
@@ -5386,6 +5386,153 @@ bool AMDGPULegalizerInfo::legalizeDSAtomicFPIntrinsic(LegalizerHelper &Helper, return true; } +bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper, + MachineInstr &MI, +

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-09 Thread Jay Foad via cfe-commits
https://github.com/jayfoad commented: LGTM overall. > add f32 pattern to select read/writelane operations Why would you need this? Don't you legalize f32 to i32? https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-09 Thread Jay Foad via cfe-commits
@@ -5386,6 +5386,130 @@ bool AMDGPULegalizerInfo::legalizeDSAtomicFPIntrinsic(LegalizerHelper &Helper, return true; } +bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper, + MachineInstr &MI, +

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-09 Thread Jay Foad via cfe-commits
@@ -5386,6 +5386,153 @@ bool AMDGPULegalizerInfo::legalizeDSAtomicFPIntrinsic(LegalizerHelper &Helper, return true; } +bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper, + MachineInstr &MI, +

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-09 Thread Jay Foad via cfe-commits
https://github.com/jayfoad edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-09 Thread Jay Foad via cfe-commits
@@ -493,8 +493,8 @@ Value *AMDGPUAtomicOptimizerImpl::buildScan(IRBuilder<> &B, if (!ST->isWave32()) { // Combine lane 31 into lanes 32..63. V = B.CreateBitCast(V, IntNTy); - Value *const Lane31 = B.CreateIntrinsic(Intrinsic::amdgcn_readlane, {}, -

[clang] [flang] [libc] [libcxx] [llvm] [mlir] Fix typo "indicies" (PR #92232)

2024-05-15 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/92232 None >From a02c63497b0d60f55e1846f5a050820082fb5c86 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Wed, 15 May 2024 10:04:57 +0100 Subject: [PATCH] Fix typo "indicies" --- clang/include/clang/AST/VTTBuilder.h

[clang] [flang] [libc] [libcxx] [llvm] [mlir] Fix typo "indicies" (PR #92232)

2024-05-15 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/92232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-23 Thread Jay Foad via cfe-commits
jayfoad wrote: > 1. What's the proper way to legalize f16 and bf16 for SDAG case without > bitcasts ? (I would think "fp_extend -> LaneOp -> Fptrunc" is wrong) Bitcast to i16, anyext to i32, laneop, trunc to i16, bitcast to original type. Why wouldn't you use bitcasts? https://github.com/llv

[clang] 967b64b - [AMDGPU] Split dot2-insts feature

2021-03-17 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-03-17T09:42:21Z New Revision: 967b64beb4bf953f452a2866716065e8bbcb5d2f URL: https://github.com/llvm/llvm-project/commit/967b64beb4bf953f452a2866716065e8bbcb5d2f DIFF: https://github.com/llvm/llvm-project/commit/967b64beb4bf953f452a2866716065e8bbcb5d2f.diff LOG: [AMD

[clang] [llvm] [AMDGPU] Enable atomic optimizer for 64 bit divergent values (PR #96473)

2024-06-26 Thread Jay Foad via cfe-commits
@@ -402,34 +413,30 @@ Value *AMDGPUAtomicOptimizerImpl::buildReduction(IRBuilder<> &B, // Reduce within each pair of rows (i.e. 32 lanes). assert(ST->hasPermLaneX16()); - V = B.CreateBitCast(V, IntNTy); jayfoad wrote: Please submit an NFC cleanup patch

[clang] [llvm] [AMDGPU] Change CF intrinsics lowering to reconverge on predecessors (PR #108596)

2024-09-16 Thread Jay Foad via cfe-commits
@@ -196,8 +208,10 @@ define amdgpu_kernel void @add_i32_constant(ptr addrspace(1) %out, ptr addrspace ; GFX11W32-NEXT:v_mbcnt_lo_u32_b32 v0, s1, 0 ; GFX11W32-NEXT:; implicit-def: $vgpr1 ; GFX11W32-NEXT:s_delay_alu instid0(VALU_DEP_1) -; GFX11W32-NEXT:v_cmpx_eq_

[clang] [flang] [lldb] [llvm] [mlir] Fix typo "instrinsic" (PR #112899)

2024-10-18 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/112899 None >From 3a3b67f30cde766adaede4cc53bec340fbe5d99f Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 18 Oct 2024 13:53:51 +0100 Subject: [PATCH] Fix typo "instrinsic" --- clang/utils/TableGen/RISCVVEmitter.

[clang] [flang] [lldb] [llvm] [mlir] Fix typo "instrinsic" (PR #112899)

2024-10-18 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/112899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [libclc] [llvm] [AMDGPU] Add a new target for gfx1153 (PR #113138)

2024-10-21 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM. The compiler currently treats it as identical to gfx1152, right? https://github.com/llvm/llvm-project/pull/113138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [flang] [libclc] [llvm] [AMDGPU] Add a new target for gfx1153 (PR #113138)

2024-10-21 Thread Jay Foad via cfe-commits
@@ -603,26 +610,30 @@ Generic processor code objects are versioned. See :ref:`amdgpu-generic-processor - ``gfx1103`` work-item within this family. - ``gfx1150``

[clang] [clang] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109399)

2024-10-25 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/109399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Bump Type::NumOfBuiltinTypeBits. NFCI. (PR #113559)

2024-10-25 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/113559 BuiltinType::LastKind is currently 507 which is close to the current limit of 511. >From fe852c49f160d9b76e61f151bc857eb8493a47db Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 24 Oct 2024 13:41:31 +0100 S

[clang] [llvm] [AMDGPU] Add a type for the named barrier (PR #113614)

2024-10-29 Thread Jay Foad via cfe-commits
@@ -839,6 +839,14 @@ Expected TargetExtType::checkParams(TargetExtType *TTy) { "target extension type riscv.vector.tuple should have one " "type parameter and one integer parameter"); + // Opaque types in the AMDGPU name space. + if (TTy->Name == "amdgcn.nam

[clang] [AST] Bump Type::NumOfBuiltinTypeBits. NFCI. (PR #113559)

2024-10-30 Thread Jay Foad via cfe-commits
jayfoad wrote: > The community doesn't add new builtin types particularly often, so having > four leftover bits isn't actually that close to the limit for us. I guess "close" is subjective. > Is there a problem with keeping this change downstream until we get to the > limit in community? No,

[clang] [AST] Bump Type::NumOfBuiltinTypeBits. NFCI. (PR #113559)

2024-10-30 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/113559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [llvm-project] Fix typo "propogate" (PR #114795)

2024-11-04 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/114795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [mlir] [llvm-project] Fix typo "propogate" (PR #114795)

2024-11-04 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/114795 None >From bcb149170d1eaf0a177deee63a9dc289dd55892b Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Mon, 4 Nov 2024 13:46:28 + Subject: [PATCH] [llvm-project] Fix typo "propogate" --- clang/test/Analysis/ma

[clang] [Clang] Add and use mangleVendorType helper. NFC. (PR #108970)

2024-10-30 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/108970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove some uses of llvm::StructType::setBody. NFC. (PR #113691)

2024-10-30 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/113691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add a type for the named barrier (PR #113614)

2024-10-25 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. Looks reasonable with the newline fix, but please wait a day in case other reviewers have comments. https://github.com/llvm/llvm-project/pull/113614 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang] Remove some uses of llvm::StructType::setBody. NFC. (PR #113691)

2024-10-25 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/113691 It is simple to create the struct body up front, now that we have transitioned to opaque pointers. >From 0fea81c2996a5476fec5681856191d55841e9f0f Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 25 Oct 2024

[clang] [llvm] [AMDGPU] Add a type for the named barrier (PR #113614)

2024-10-25 Thread Jay Foad via cfe-commits
https://github.com/jayfoad edited https://github.com/llvm/llvm-project/pull/113614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add a type for the named barrier (PR #113614)

2024-10-25 Thread Jay Foad via cfe-commits
@@ -15,7 +15,15 @@ AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) #endif +#ifndef AMDGPU_NAMED_BARRIER_TYPE +#define AMDGPU_NAMED_BARRIER_TYPE(Name, Id, SingletonId, Width, Align, Scope) \ + AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) +#endif + AMDGPU_OPAQUE_PTR_TYP

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

2024-11-01 Thread Jay Foad via cfe-commits
jayfoad wrote: > [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific > info), start with `llvm.amdgcn.wavefrontsize` Mismatched parentheses. (Also it's a bit longer than git likes. https://github.com/llvm/llvm-project/pull/114481 _

[clang] [lldb] [AMDGPU] Specify width and align for all AMDGPU builtin types. NFC. (PR #109656)

2024-09-23 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/109656 This will be used in ASTContext::getTypeInfo which needs this information for all builtin types, not just pointers. >From 0ef4ea17a711a1ee95080bc1635ae9aa824df596 Mon Sep 17 00:00:00 2001 From: Jay Foad Date:

[clang-tools-extra] [clang-tools-extra] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109400)

2024-09-21 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/109400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109400)

2024-09-20 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/109400 Follow up to #109133. >From ebffad800626acbdb06c74633c0950e24df755c8 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 20 Sep 2024 11:16:23 +0100 Subject: [PATCH] [clang-tools-extra] Use {} instead of std::nu

[clang-tools-extra] [clang-tools-extra] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109400)

2024-09-20 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/109400 >From ebffad800626acbdb06c74633c0950e24df755c8 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 20 Sep 2024 11:16:23 +0100 Subject: [PATCH 1/2] [clang-tools-extra] Use {} instead of std::nullopt to initialize

[clang] [llvm] [AMDGPU] Change CF intrinsics lowering to reconverge on predecessors (PR #108596)

2024-09-20 Thread Jay Foad via cfe-commits
jayfoad wrote: > Although, revisiting this now, I still don't understand why they decided to > include ALL spill opcodes in the prologue, but not only the SGPR spills? > Clearly, none of the VGPR reloads really belong to the prologue. > > At a first glance, changing the isSpill(opcode) to isSG

<    1   2   3   >