)]}'
{
  "commit": "5de5fd66196e052c73375e80c1a232b2e1f36707",
  "tree": "0895fca9173d8b1758e8b84bf788a04721097216",
  "parents": [
    "9ab56d9ab46c2b1739b9fd35d6aff8e24c2913f9"
  ],
  "author": {
    "name": "Jin Ma",
    "email": "jinma@linux.alibaba.com",
    "time": "Tue May 19 17:31:27 2026 +0800"
  },
  "committer": {
    "name": "Jin Ma",
    "email": "jinma@linux.alibaba.com",
    "time": "Tue May 26 10:12:59 2026 +0800"
  },
  "message": "RISC-V: Fix multiple bugs in riscv_macro_fusion_pair_p\n\nFix several correctness and minor issues in the fusion pair\nmatching logic:\n\nXINT (prev_set, 1) in RISCV_FUSE_AUIPC_LD incorrectly accesses\nthe SET node rather than its UNSPEC source operand.  Use\nXINT (SET_SRC (prev_set), 1) to match riscv_fuse_auipc_addi.\n\nRISCV_FUSE_CACHE_ALIGNED_STD compared base registers with !\u003d instead\nof \u003d\u003d, causing it to match stores with different bases rather than\nthe same base which is required for cache-line alignment analysis.\n\nRISCV_FUSE_B_ALUI sub+smax pattern had a redundant CONST_INT_P\ncheck on the same operand already validated by the CONST0_RTX\ncomparison.\n\nRISCV_FUSE_LDINDEXED had a duplicate REG_P check on the same\noperand.\n\nAlso fix a typo (\"hte\" -\u003e \"the\") in a comment and correct the\ndump output string from \"RISCV_FUSE_ALIGNED_STD\" to\n\"RISCV_FUSE_CACHE_ALIGNED_STD\" for the cache-aligned case.\n\nTests are marked XFAIL as no upstream mtune currently enables\nAUIPC_LD, CACHE_ALIGNED_STD, B_ALUI, or LDINDEXED.  The\nexisting fusion-auipc-addi.c test indirectly validates the\nXINT fix since AUIPC_ADDI shares the same UNSPEC_AUIPC check\ncode path.\n\ngcc/ChangeLog:\n\n\t* config/riscv/riscv-fusion.cc (riscv_macro_fusion_pair_p):\n\tFix XINT to access SET_SRC (prev_set) in AUIPC_LD case.\n\tFix base register comparison from !\u003d to \u003d\u003d in\n\tCACHE_ALIGNED_STD case.  Remove redundant CONST_INT_P\n\tcheck in B_ALUI sub+smax case.  Remove duplicate REG_P\n\tcheck in LDINDEXED case.  Fix typo in comment.  Fix dump\n\toutput name for CACHE_ALIGNED_STD.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.target/riscv/fusion-auipc-ld.c: New test.\n\t* gcc.target/riscv/fusion-b-alui.c: New test.\n\t* gcc.target/riscv/fusion-cache-aligned-std.c: New test.\n\t* gcc.target/riscv/fusion-ldindexed.c: New test.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5bce3eda0a6c4db01f7000ce4072278767cf2708",
      "old_mode": 33188,
      "old_path": "gcc/config/riscv/riscv-fusion.cc",
      "new_id": "990eab405a64aae43dceeeb3277711694031774b",
      "new_mode": 33188,
      "new_path": "gcc/config/riscv/riscv-fusion.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e3a24e495e11b61343e2039d8bca48f691f3f36e",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/riscv/fusion-auipc-ld.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3ae0295716394eaa56e852eec69fa88b2e14bfe5",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/riscv/fusion-b-alui.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5484e0c05758884cb838b475490e1bc3b5468d5c",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/riscv/fusion-cache-aligned-std.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7687edeec157bd0ff5071f8e0794227a4ace89d2",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/riscv/fusion-ldindexed.c"
    }
  ]
}
