get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2215713/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2215713,
    "url": "http://patchwork.ozlabs.org/api/patches/2215713/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260325072306.2773207-3-herumi@nifty.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260325072306.2773207-3-herumi@nifty.com>",
    "list_archive_url": null,
    "date": "2026-03-25T07:23:05",
    "name": "[2/3] i386: Add BMI2 MULX pattern for highpart-only multiplication",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "696c0f9eee892806384adb26ffe5be7bbd4ea706",
    "submitter": {
        "id": 92964,
        "url": "http://patchwork.ozlabs.org/api/people/92964/?format=api",
        "name": null,
        "email": "herumi@nifty.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260325072306.2773207-3-herumi@nifty.com/mbox/",
    "series": [
        {
            "id": 497388,
            "url": "http://patchwork.ozlabs.org/api/series/497388/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=497388",
            "date": "2026-03-25T07:23:03",
            "name": "Optimize 32-bit unsigned constant division for 64-bit targets",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497388/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2215713/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2215713/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256\n header.s=default-1th84yt82rvi header.b=m0foAAK9;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256\n header.s=default-1th84yt82rvi header.b=m0foAAK9",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=nifty.com",
            "sourceware.org; spf=pass smtp.mailfrom=nifty.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=106.153.226.39"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgdjL2pfwz1xy3\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 18:25:26 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 6479D4BB58B6\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 07:25:24 +0000 (GMT)",
            "from mta-snd-e07.mail.nifty.com (mta-snd-e07.mail.nifty.com\n [106.153.226.39])\n by sourceware.org (Postfix) with ESMTPS id C37C14BAD164\n for <gcc-patches@gcc.gnu.org>; Wed, 25 Mar 2026 07:23:32 +0000 (GMT)",
            "from sapp by mta-snd-e07.mail.nifty.com with ESMTP\n id <20260325072331039.YSAM.14880.sapp@nifty.com>;\n Wed, 25 Mar 2026 16:23:31 +0900"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 6479D4BB58B6",
            "OpenDKIM Filter v2.11.0 sourceware.org C37C14BAD164"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org C37C14BAD164",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org C37C14BAD164",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774423413; cv=none;\n b=DuYiOLp7T0R0YJEogR8rwTe2tn24qS6WcGEmxSlpXY2aXpfbiQV/2rO7A4MFE43qFBKbo7aro5Id4PFsu76vP/gLDVFW9Kg6Ve6V+SnDWeuBQrGX0EaDN7QPMot1KQxRBUqIKL1dEd2vnohWGtv+6oQbG2mfwqiJGCOiOh1kcio=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774423413; c=relaxed/simple;\n bh=Dm/L4a4VzIktFC79NX8kHMx4h6Uy1tx9bLRPyRuFRoM=;\n h=From:To:Subject:Date:Message-ID:MIME-Version:DKIM-Signature;\n b=p5ogOG/Jz23MX/4CWZIq8Cus5B96DNeUoICAVqcgBlqH90mg331E6rumY4N/0qZQdkRUuNwlSf3qTplpAEbORs9mal7dzuu4aL5OX7x1D56ylkK9Nmt50WhVVjIa4Nym4a9+AmgdJOaIBU5seZQmSmCJdgFh1PQlm58xgbOS2Qs=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "From": "herumi@nifty.com",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "MITSUNARI Shigeo <herumi@nifty.com>",
        "Subject": "[PATCH 2/3] i386: Add BMI2 MULX pattern for highpart-only\n multiplication",
        "Date": "Wed, 25 Mar 2026 16:23:05 +0900",
        "Message-ID": "<20260325072306.2773207-3-herumi@nifty.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260325072306.2773207-1-herumi@nifty.com>",
        "References": "<20260325072306.2773207-1-herumi@nifty.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n s=default-1th84yt82rvi; t=1774423411;\n bh=ODsyLOCh3GPr2L9KDVSfmBY9Pv2obLIrcAm6aUuiMh8=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=m0foAAK926rXuomznbw8YUP3YdvNMPTp1CIWF+YjYxNgdPPZrPfrjwi0x3urHvcCDj1fvH8E\n Zq3OMqkH5qgQVcanR91/CFUhHeIbHDdzu+So6vhfPAxnTpdKE/jSG6WbBPar1h/jmfy++laNGL\n rPWTwv2GrkUv0t38Uh4ohqVroGAJINLgXX5cDoJPX6UtOm6rJevQTjaqzRl2EobNMuCDKbQ87Q\n SWQnCSBSULicAkj4hCat4Y5jAaJxfduoP7jaaO9oEj3Rn6Oj2tKoIdXsAa0c6NDkX0i+SlqM8U\n Dx5v0n21FDSkWlgP29VDzN2ap7gPU2WMcptuhfwvWM1msudg==",
        "X-BeenThere": "gcc-patches@gcc.gnu.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>",
        "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>",
        "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "From: MITSUNARI Shigeo <herumi@nifty.com>\n\nAdd a new instruction pattern that uses MULX to compute only the high\npart of an unsigned multiplication on BMI2 targets.  Previously, when\nonly the high part was needed, GCC would emit MULQ followed by a MOV\nto retrieve the result from RDX.  With this pattern, MULX writes the\nhigh part directly to the destination register, saving one instruction.\n\nThis benefits unsigned 32-bit integer division by constants that require\n33-bit magic multipliers (e.g., division by 7), reducing the sequence\nfrom 4 instructions to 3 on BMI2 targets.\n\nBefore:\n    movabsq $2635249153617166336, %rcx\n    movl    %edi, %eax\n    mulq    %rcx\n    movl    %edx, %eax\n\nAfter:\n    movabsq $2635249153617166336, %rax\n    movl    %edi, %edx\n    mulx    %rax, %rdx, %rax\n\ngcc/ChangeLog:\n\n\t* config/i386/i386.md (*bmi2_umul<mode>3_highpart): New pattern.\n---\n gcc/config/i386/i386.md | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)",
    "diff": "diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md\nindex c05161fc8bc..1da4644203d 100644\n--- a/gcc/config/i386/i386.md\n+++ b/gcc/config/i386/i386.md\n@@ -11462,6 +11462,21 @@\n \t      (set (match_dup 5)\n \t\t   (umul_highpart:DWIH (match_dup 2) (match_dup 3)))])])\n \n+;; BMI2 MULX highpart-only pattern.  Uses MULX to get only the high part,\n+;; discarding the low part into a scratch register.  This avoids the\n+;; mov from rdx after mulq when only the high part is needed.\n+(define_insn \"*bmi2_umul<mode>3_highpart\"\n+  [(set (match_operand:DWIH 0 \"register_operand\" \"=r\")\n+\t(umul_highpart:DWIH\n+\t  (match_operand:DWIH 1 \"register_operand\" \"d\")\n+\t  (match_operand:DWIH 2 \"nonimmediate_operand\" \"rm\")))\n+   (clobber (match_scratch:DWIH 3 \"=r\"))]\n+  \"TARGET_BMI2\"\n+  \"mulx\\t{%2, %3, %0|%0, %3, %2}\"\n+  [(set_attr \"type\" \"imulx\")\n+   (set_attr \"prefix\" \"vex\")\n+   (set_attr \"mode\" \"<MODE>\")])\n+\n ;; Highpart multiplication patterns\n (define_insn \"<s>mul<mode>3_highpart\"\n   [(set (match_operand:DWIH 0 \"register_operand\" \"=d\")\n",
    "prefixes": [
        "2/3"
    ]
}