[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-22 Thread Sam Elliott via cfe-commits
lenary wrote: NVM about GlobalISel "Inline asm lowering is not supported for this target yet". https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] [RISCV] Add Smrnmi extension (PR #111668)

2024-10-24 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/111668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-29 Thread Sam Elliott via cfe-commits
@@ -2238,6 +2256,17 @@ MVT RISCVTargetLowering::getRegisterTypeForCallingConv(LLVMContext &Context, return PartVT; } +unsigned +RISCVTargetLowering::getNumRegisters(LLVMContext &Context, EVT VT, lenary wrote: This is to prevent an assert that is hit in `R

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: > Thanks! I just had a detailed look. Given that you have explained almost all > the code detailedly, I think this PR looks great to me! Just some overall > comments: > > 1. I personally like your proposal of adding new constraints, but we still > need the

[clang] [llvm] [RFC][RISCV] Use the 'B' extension in RISC-V profile definitions (PR #113942)

2024-10-29 Thread Sam Elliott via cfe-commits
lenary wrote: I think we shouldn't do this for RVA22, so as not to break existing users of that profile, who may have a toolchain that doesn't support B. This change makes sense to me for the RV*23 profiles, especially since your change to RVM23 has been accepted. https://github.com/llvm/llvm

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-05 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-05 Thread Sam Elliott via cfe-commits
lenary wrote: Gentle Ping. I'm looking for answers to two questions: - [Should I] prepare a fixup commit that [uses `MVT::Untyped`] (and removes the `riscv_*_pair` MVTs), if we think that's a better target-independent approach? - Any advice on whether I should be digging deeply into changing

[clang-tools-extra] [llvm] [mlir] [llvm][NFC] Fix typos: replace “avaliable” with “available” across various files (PR #114524)

2024-11-01 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/114524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [mlir] [llvm][NFC] Fix typos: replace “avaliable” with “available” across various files (PR #114524)

2024-11-01 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/114524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-25 Thread Sam Elliott via cfe-commits
lenary wrote: Today's changes address all the CI failures, by adding better checking before turning BITCAST into `BuildPairF64` or `SplitF64` - the conditions are derived from the conditions on `setOperationAction(ISD::BITCAST, MVT::i64, Custom)` before this patch added more of the same. htt

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary ready_for_review https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add the Sha extension (PR #113820)

2024-10-28 Thread Sam Elliott via cfe-commits
lenary wrote: > I haven't made it so if you enable all extensions that constitute Sha, Sha is > implied. Great! I think it's most clear if we have "extensions only require things they are made up of" (i.e. all the implications/requirements point to earlier/lesser extensions) and "profiles are

[clang] [llvm] [RISCV] Use the 'B' extension in RISC-V profile definitions (PR #113942)

2024-11-11 Thread Sam Elliott via cfe-commits
lenary wrote: Sorry I didn't get to this over the weekend. LGTM. https://github.com/llvm/llvm-project/pull/113942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-12 Thread Sam Elliott via cfe-commits
lenary wrote: > > Gentle Ping. I'm looking for answers to two questions: > > > > * [Should I] prepare a fixup commit that [uses `MVT::Untyped`] (and removes > > the `riscv_*_pair` MVTs), if we think that's a better target-independent > > approach? > > I guess so. I didn't know about the Syste

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-12 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/112983 >From a63ead48585be1d6aa5e1b78926ede485e76e2f2 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 22 Oct 2024 12:37:48 -0700 Subject: [PATCH 1/5] [RISCV] GPR Pairs for Inline Asm using `Pr` This patch adds su

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
@@ -74,7 +74,10 @@ def sub_gpr_odd : SubRegIndex<32, 32> { } } // Namespace = "RISCV" -// Integer registers +//===--===// lenary wrote: I'll do my best to. https://github.com/llvm/llvm-pro

[clang] [clang][RISCV] Support `norelax` attribute for RISCV (PR #115981)

2024-11-13 Thread Sam Elliott via cfe-commits
lenary wrote: Two comments: - I don't think the c-api-doc change is going to be accepted at this rate - One of the nice things about the monorepo is that you can do a Clang+Backend change like what this requires in a single PR, rather than committing it bit-by-bit. Seeing the entire change in o

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/112983 >From 0b98a56337d3210e82cac0f509eb7d3d547083f9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 22 Oct 2024 12:37:48 -0700 Subject: [PATCH] [RISCV] GPR Pairs for Inline Asm using `Pr` This patch adds suppor

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
lenary wrote: The commit I just pushed up should be the final version, and not fundamentally different from what was reviewed (but with various NFC patches split out). I think I do have a route towards merging GPRPair and GPRF64Pair, but I'll do that in a follow-up, as there's a mystery crash

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
lenary wrote: I'm not sure this requires re-review, so I plan to land this tomorrow (UK time) if I don't hear anything else. https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
@@ -952,14 +952,43 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) { ReplaceNode(Node, Res); return; } + case RISCVISD::BuildGPRPair: { +SDValue Ops[] = { +CurDAG->getTargetConstant(RISCV::GPRPairRegClassID, DL, MVT::i32), +Node->getOperand(0), +

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
@@ -74,7 +74,10 @@ def sub_gpr_odd : SubRegIndex<32, 32> { } } // Namespace = "RISCV" -// Integer registers +//===--===// lenary wrote: Landed as https://github.com/llvm/llvm-project/commit

[clang] [llvm] [RISCV] Merge GPRPair and GPRF64Pair (PR #116094)

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/116094 This is a stacked PR. Just review 716b3d5055e95f161d8e0fc34c802a059266ffc1 (the prior commit is #112983). As suggested by @topperc, this tries to merge the two sets of register classes created in #112983, GPRPa

[clang] [llvm] [RISCV] Merge GPRPair and GPRF64Pair (PR #116094)

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/116094 >From 0b98a56337d3210e82cac0f509eb7d3d547083f9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 22 Oct 2024 12:37:48 -0700 Subject: [PATCH 1/3] [RISCV] GPR Pairs for Inline Asm using `Pr` This patch adds su

[clang] [llvm] [RISCV] Merge GPRPair and GPRF64Pair (PR #116094)

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/116094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
@@ -952,14 +952,43 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) { ReplaceNode(Node, Res); return; } + case RISCVISD::BuildGPRPair: { +SDValue Ops[] = { +CurDAG->getTargetConstant(RISCV::GPRPairRegClassID, DL, MVT::i32), +Node->getOperand(0), +

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
lenary wrote: I will rewrite the description of the PR momentarily, once I've rebased over the cleanup/comments to RISCVRegisterinfo.td https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/112983 >From a63ead48585be1d6aa5e1b78926ede485e76e2f2 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 22 Oct 2024 12:37:48 -0700 Subject: [PATCH 1/7] [RISCV] GPR Pairs for Inline Asm using `Pr` This patch adds su

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/112983 >From a63ead48585be1d6aa5e1b78926ede485e76e2f2 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 22 Oct 2024 12:37:48 -0700 Subject: [PATCH 1/8] [RISCV] GPR Pairs for Inline Asm using `Pr` This patch adds su

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-13 Thread Sam Elliott via cfe-commits
@@ -21351,6 +21372,17 @@ bool RISCVTargetLowering::splitValueIntoRegisterParts( unsigned NumParts, MVT PartVT, std::optional CC) const { bool IsABIRegCopy = CC.has_value(); EVT ValueVT = Val.getValueType(); + + if (ValueVT == (Subtarget.is64Bit() ? MVT::i128 : MVT::i64

[clang-tools-extra] [llvm] [mlir] [llvm] Fix typos: replace “avaliable” with “available” across various files (PR #114524)

2024-11-01 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/114524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RFC][RISCV] Use the 'B' extension in RISC-V profile definitions (PR #113942)

2024-11-07 Thread Sam Elliott via cfe-commits
lenary wrote: > > I think we shouldn't do this for RVA22, so as not to break existing users > > of that profile, who may have a toolchain that doesn't support B. > > This change makes sense to me for the RV*23 profiles, especially since your > > change to RVM23 has been accepted. > > For RVA22

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-10-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisls (Scaled Load Store) extension (PR #117987)

2024-11-28 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/117987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisls (Scaled Load Store) extension (PR #117987)

2024-11-28 Thread Sam Elliott via cfe-commits
@@ -771,9 +772,11 @@ Error RISCVISAInfo::checkDependency() { return getIncompatibleError("xwchc", "zcb"); } - if (Exts.count("xqcicsr") != 0 && (XLen != 32)) { -return getError("'xqcicsr' is only supported for 'rv32'"); - } + for (auto Ext : XqciExts) +if (E

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisls (Scaled Load Store) extension (PR #117987)

2024-11-28 Thread Sam Elliott via cfe-commits
@@ -22,6 +22,28 @@ // Instruction Class Templates //===--===// +let hasSideEffects = 0, mayLoad = 1, mayStore = 0 in { +class QCILoad_ScaleIdx func4, string opcodestr> +: RVInstRBase<0b111, OPC_CUSTOM_0,

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisls (Scaled Load Store) extension (PR #117987)

2024-11-28 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: The encodings and functionality here are correct, but we're missing a test and it would be good to add a comment to the scaled store tablegen class. https://github.com/llvm/llvm-project/pull/117987 ___ cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisls (Scaled Load Store) extension (PR #117987)

2024-11-28 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-18 Thread Sam Elliott via cfe-commits
lenary wrote: Kito and I have agreed `R` is a good way forwards for GPR pairs, and the c-api-doc PR is approved (but not landed). I'll reword the description/message to update our constraint choice when I land this, which I hope to get to later today. https://github.com/llvm/llvm-project/pul

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-20 Thread Sam Elliott via cfe-commits
@@ -203,9 +203,28 @@ def HasStdExtM : Predicate<"Subtarget->hasStdExtM()">, // Atomic Extensions +def FeatureStdExtZaamo +: RISCVExtension<"zaamo", 1, 0, + "'Zaamo' (Atomic Memory Operations)">; +def HasStdExtAOrZaamo +: Predicate<"Subtarget->hasSt

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('R') (PR #112983)

2024-11-18 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('R') (PR #112983)

2024-11-18 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('R') (PR #112983)

2024-11-18 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [RISCV] Make A implies Zaamo and Zalrsc (PR #116907)

2024-11-21 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/116907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,158 @@ +//===--- RISCVRemoveBackToBackBranches.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-14 Thread Sam Elliott via cfe-commits
lenary wrote: I won't be merging this today. Instead, two changes/updates: - Moving to use `R` instead of `Pr`, because kito pointed out that GCC cannot use `P` for anything except immediate values (done as a fixup for the moment, so we can back it out if we're struggling to agree on letters) -

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-14 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/112983 >From 0b98a56337d3210e82cac0f509eb7d3d547083f9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 22 Oct 2024 12:37:48 -0700 Subject: [PATCH 1/3] [RISCV] GPR Pairs for Inline Asm using `Pr` This patch adds su

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-11-25 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,208 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=riscv64 -mattr=+m,+v -O2 < %s \ +; RUN: | FileCheck %s -check-prefix=RV64I lenary wrote: Why is this only testing rv64? https://github.com/ll

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcia (Arithmetic) extension (PR #118113)

2024-11-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. I note Craig has questions about the spec, we will ensure those are relayed to the spec authors, but they don't relate to encoding/assembling problems, so I'm not sure if they should block landing this. https://github.com/llvm/llvm-p

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-12-04 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,87 @@ +//===-- xray_trampoline_riscv32.s --*- ASM -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-12-04 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,87 @@ +//===-- xray_trampoline_riscv32.s --*- ASM -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-12-09 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-01 Thread Sam Elliott via cfe-commits
@@ -4963,6 +4963,10 @@ def msave_restore : Flag<["-"], "msave-restore">, Group, def mno_save_restore : Flag<["-"], "mno-save-restore">, Group, HelpText<"Disable using library calls for save and restore">; } // let Flags = [TargetSpecific] +def mload_store_pairs : Flag<["-"]

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicm (Conditional Move) extension (PR #121752)

2025-01-06 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/121752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Multilib] Custom flags YAML parsing (PR #110657)

2025-01-06 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqciac (Load-Store Adress calculation) extension (PR #121037)

2024-12-28 Thread Sam Elliott via cfe-commits
@@ -184,6 +191,37 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { } // hasSideEffects = 0, mayLoad = 0, mayStore = 0 } // Predicates = [HasVendorXqcia, IsRV32], DecoderNamespace = "Xqcia" +let Predicates = [HasVendorXqciac, IsRV32], DecoderNamespace = "Xqciac" in { +

[clang] [llvm] [RISCV] Add Qualcomm uC Xqciac (Load-Store Adress calculation) extension (PR #121037)

2024-12-27 Thread Sam Elliott via cfe-commits
@@ -184,6 +191,37 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { } // hasSideEffects = 0, mayLoad = 0, mayStore = 0 } // Predicates = [HasVendorXqcia, IsRV32], DecoderNamespace = "Xqcia" +let Predicates = [HasVendorXqciac, IsRV32], DecoderNamespace = "Xqciac" in { +

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-12-10 Thread Sam Elliott via cfe-commits
lenary wrote: > > @rzinsly do you need someone to commit this? > > Yes, please. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. Otherwise the commit will be from the github hidden email which we don't use in LLVM. See [LLVM Disc

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-12-10 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/117612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilsm (Load Store Multiple) extension (PR #119823)

2024-12-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM, but please wait for Craig to approve as well. https://github.com/llvm/llvm-project/pull/119823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-21 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. I am out of the loop on the discussion in the call today, but I can confirm this is a correct implementation of Xqcicsr, according to the specification. https://github.com/llvm/llvm-project/pull/117169 ___

[clang] [llvm] [RISCV] Support cR Inline Asm Constraint (PR #124174)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/124174 This denotes RVC-compatible GPR Pairs, which are used by the Zclsd extension. C API PR: riscv-non-isa/riscv-c-api-doc#102 >From d26d237f6586b879aab96b5f604e2e85156e778f Mon Sep 17 00:00:00 2001 From: Sam Elliott

[clang] [llvm] [RISCV] Support cR Inline Asm Constraint (PR #124174)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/124174 >From d26d237f6586b879aab96b5f604e2e85156e778f Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Thu, 23 Jan 2025 10:48:08 -0800 Subject: [PATCH 1/2] [RISCV] Support cR Inline Asm Constraint This denotes RVC-comp

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
lenary wrote: You still have a whitespace change to this file? https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
@@ -238,3 +247,11 @@ void RISCVSubtarget::overridePostRASchedPolicy(MachineSchedPolicy &Policy, Policy.OnlyBottomUp = false; } } + +bool RISCVSubtarget::useLoadStorePairs() const { + return UseMIPSLoadStorePairsOpt && HasVendorXMIPSLSP; +} lenary wrote:

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. Two tiny issues, but I think I'm happy for this to land. https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support cR Inline Asm Constraint (PR #124174)

2025-01-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/124174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Renaming muladdi to muliadd as per v0.5 spec. (PR #124237)

2025-01-27 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/124237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqciint (Interrupts) extension (PR #122256)

2025-01-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/122256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicli (Conditional Load Immediate) extension (PR #121292)

2025-01-02 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/121292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
@@ -1448,3 +1448,18 @@ def FeatureTaggedGlobals : SubtargetFeature<"tagged-globals", "AllowTaggedGlobals", "true", "Use an instruction sequence for taking the address of a global " "that allows a memory tag in the upper address bits">; + +def FeatureVendorMIPSCMove

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
lenary wrote: Please can you undo these whitespace changes, given you're not really making changes to this file https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/121394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-16 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: Some small notes, the one about using RISCVExtension will probably have the most knock-on work (run both the llvm and the clang test suites after that change, to see where that info gets to) https://github.com/llvm/llvm-project/pull/121394 _

[clang] [llvm] [RISCV] Add Qualcomm uC Xqciint (Interrupts) extension (PR #122256)

2025-01-10 Thread Sam Elliott via cfe-commits
@@ -313,6 +313,7 @@ enum OperandType : unsigned { OPERAND_UIMM8_LSB000, OPERAND_UIMM8_GE32, OPERAND_UIMM9_LSB000, + OPERAND_UIMM10, lenary wrote: Please can you add `CASE_OPERAND_UIMM(10)` to the right place in `RISCVInstrInfo::verifyInstruction`? htt

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-23 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/124706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-24 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/124706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-20 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,117 @@ +# Xqcilia - Qualcomm uC Large Immediate Arithmetic extension +# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcilia < %s 2>&1 \ +# RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS,CHECK-IMM %s +# RUN: not llvm-mc -triple riscv32 -mattr=-experiment

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-26 Thread Sam Elliott via cfe-commits
@@ -783,6 +783,54 @@ void RISCVFrameLowering::allocateStack(MachineBasicBlock &MBB, } } +static bool isPush(unsigned Opcode) { + switch (Opcode) { + case RISCV::CM_PUSH: + case RISCV::QC_CM_PUSH: + case RISCV::QC_CM_PUSHFP: +return true; + default: +return fals

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-26 Thread Sam Elliott via cfe-commits
@@ -783,6 +783,54 @@ void RISCVFrameLowering::allocateStack(MachineBasicBlock &MBB, } } +static bool isPush(unsigned Opcode) { + switch (Opcode) { + case RISCV::CM_PUSH: + case RISCV::QC_CM_PUSH: + case RISCV::QC_CM_PUSHFP: +return true; + default: +return fals

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-26 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/8] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisim (Simulation Hint) extension (PR #128833)

2025-02-26 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: Looks good with Craig's requested changes. https://github.com/llvm/llvm-project/pull/128833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-26 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/8] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/6] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,95 @@ +//=== RISCVInstrInfoXqccmp.td --*- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: Only one nit, otherwise looks good I think. I didn't closely inspect the encodings. https://github.com/llvm/llvm-project/pull/128773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/128773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Xqcia 0.4 Spec renamed qc.(sla/sll)sat to qc.(shl/shlu)sat (PR #128710)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/128710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Xqcia 0.4 Spec renamed qc.(sla/sll)sat to qc.(shl/shlu)sat (PR #128710)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. I edited the description for readability, so please use it as the message when squashing this PR. https://github.com/llvm/llvm-project/pull/128710 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/6] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/7] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -141,9 +141,38 @@ class RISCVMachineFunctionInfo : public MachineFunctionInfo { // We cannot use fixed locations for the callee saved spill slots if the // function uses a varargs save area. // TODO: Use a separate placement for vararg registers to enable Zcmp.

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -120,12 +144,7 @@ bool RISCVPushPopOpt::runOnMachineFunction(MachineFunction &Fn) { // If Zcmp extension is not supported, abort. const RISCVSubtarget *Subtarget = &Fn.getSubtarget(); - if (!Subtarget->hasStdExtZcmp()) -return false; - - // If frame pointer elimi

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -0,0 +1,35 @@ +# RUN: not llvm-mc -triple=riscv32 -mattr=+experimental-xqccmp -M no-aliases -show-encoding < %s 2>&1 \ +# RUN: | FileCheck -check-prefixes=CHECK-ERROR %s + +# CHECK-ERROR: error: invalid operand for instruction +qc.cm.mvsa01 a1, a2 + +# CHECK-ERROR: error:

[clang] [llvm] [RISCV][MC] Add assembler support for XRivosVisni (PR #128773)

2025-02-25 Thread Sam Elliott via cfe-commits
@@ -25,3 +65,27 @@ defm RI_VZIP2B_V : VALU_IV_V<"ri.vzip2b", 0b010100>; defm RI_VUNZIP2A_V : VALU_IV_V<"ri.vunzip2a", 0b001000>; defm RI_VUNZIP2B_V : VALU_IV_V<"ri.vunzip2b", 0b011000>; } + +//===--===// +// XR

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/4] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

<    1   2   3   >