)]}'
{
  "commit": "dff9c226cf9a17eb774efbc29ab9c3a395a3ec9e",
  "tree": "a1fd12dbf167f4d78c8e36102975ad85eb9912e6",
  "parents": [
    "11de186f02445023bb7d6e9e001087a6e07fc0b2"
  ],
  "author": {
    "name": "Jin Ma",
    "email": "jinma@linux.alibaba.com",
    "time": "Wed Aug 26 16:13:33 2026 +0800"
  },
  "committer": {
    "name": "Jin Ma",
    "email": "jinma@linux.alibaba.com",
    "time": "Mon Aug 31 19:36:56 2026 +0800"
  },
  "message": "RISC-V: Use bext for masked bit-test branches\n\nThe branch-specific Zbs split only recognizes bit indices\nzero-extended from QImode.  Bit tests with an XLEN-wide index instead\nmask the index with XLEN - 1, so combine emits a bset/and pair before\nthe branch.\n\nBEXT applies the same XLEN - 1 mask to its index.  Match the masked\nform only when the mask is exactly XLEN - 1, then split it into bext\nand the branch.  With register allocation normalized, the key sequence\nchanges from:\n\n  bset  t0,zero,a1\n  and   a4,t0,t1\n  bne   a4,zero,.L\n\nto:\n\n  bext  a4,t1,a1\n  bne   a4,zero,.L\n\nThis removes one instruction from each affected branch.  On SPEC CPU\n2017 Integer 541.leela_r, the measured dynamic instruction count drops\nby about 0.5%.\n\ngcc/ChangeLog:\n\n\t* config/riscv/bitmanip.md: Split masked bit-test branches into\n\tBEXT.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.target/riscv/zbs-branch-bext.C: New test.\n\t* gcc.target/riscv/zbs-branch-bext.c: New test.\n\nSigned-off-by: Jin Ma \u003cjinma@linux.alibaba.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "be893f12d9174dade0364a9f2003a55a006faa76",
      "old_mode": 33188,
      "old_path": "gcc/config/riscv/bitmanip.md",
      "new_id": "1f0b3ec3d506015d847bf5d74b64816ede2c2013",
      "new_mode": 33188,
      "new_path": "gcc/config/riscv/bitmanip.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2876faf070fc9aa2d55a608b7f124fbe1e324f35",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.target/riscv/zbs-branch-bext.C"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0c0cd982d0a8a37ac291cb85fc65cb8f1a5edd1f",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/riscv/zbs-branch-bext.c"
    }
  ]
}
