)]}'
{
  "commit": "1154d3c3b28f6772a2be5f18a1d648a7d8313a16",
  "tree": "b3dd5685542704513b87dd4fe90388f33efb4443",
  "parents": [
    "fe2538e809c20cf7945fcf9cc4fb340b7a4e66b4"
  ],
  "author": {
    "name": "Guo Jie",
    "email": "guojie@loongson.cn",
    "time": "Thu Dec 03 16:22:11 2026 +0800"
  },
  "committer": {
    "name": "Guo Jie",
    "email": "guojie@loongson.cn",
    "time": "Sun Dec 06 14:10:56 2026 +0800"
  },
  "message": "LoongArch: Add reduc_widen_\u003csu\u003esum optab support\n\nAdd reduc_widen_ssum and reduc_widen_usum expansions for LSX and LASX.\nLoongArch has no accumulating form of vhaddw, so chain pairwise widening\nadds and merge the result into the accumulator with one vector add.\nCover half-, quarter-, and eighth-width reductions.\n\n---\nChanges in v2:\n- Replace `rtx (*gen) (rtx, rtx, rtx)` with\n  `rtx_insn *(*gen) (rtx, rtx, rtx)` for r17-6440.\n\ngcc/ChangeLog:\n\n\t* config/loongarch/loongarch-protos.h\n\t(loongarch_expand_reduc_widen_sum): Declare.\n\t* config/loongarch/loongarch.cc\n\t(loongarch_emit_widen_pair_sum): New function.\n\t(loongarch_expand_reduc_widen_sum): New function.\n\t* config/loongarch/simd.md\n\t(IVEC_WS_2, IVEC_WS_4, IVEC_WS_8): New mode iterators.\n\t(WVEC_OCT, wvec_oct): New mode attributes.\n\t(reduc_widen_\u003csu\u003esum\u003cwvec_half\u003e\u003cmode\u003e3): New expand.\n\t(reduc_widen_\u003csu\u003esum\u003cwvec_quarter\u003e\u003cmode\u003e3): New expand.\n\t(reduc_widen_\u003csu\u003esum\u003cwvec_oct\u003e\u003cmode\u003e3): New expand.\n\ngcc/testsuite/ChangeLog:\n\n\t* lib/target-supports.exp\n\t(check_effective_target_vect_widen_sum_hi_to_si_pattern):\n\tSupport LoongArch.\n\t* gcc.target/loongarch/vector/lasx/reduc-widen-sum.c: New test.\n\t* gcc.target/loongarch/vector/lsx/reduc-widen-sum.c: New test.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "eb0ac098f1194cb93ffae7a76fee08b6a3ffb38e",
      "old_mode": 33188,
      "old_path": "gcc/config/loongarch/loongarch-protos.h",
      "new_id": "63a671c933a55018063574ad31115b84c74b2946",
      "new_mode": 33188,
      "new_path": "gcc/config/loongarch/loongarch-protos.h"
    },
    {
      "type": "modify",
      "old_id": "c56d8c3fe1b1c888128705e3c59783dd318ab454",
      "old_mode": 33188,
      "old_path": "gcc/config/loongarch/loongarch.cc",
      "new_id": "9bf6846ee85bd045b17e18546472c0092f77f583",
      "new_mode": 33188,
      "new_path": "gcc/config/loongarch/loongarch.cc"
    },
    {
      "type": "modify",
      "old_id": "83c93ad8b54b26380c3c567cf65ba91ceaa2a6cc",
      "old_mode": 33188,
      "old_path": "gcc/config/loongarch/simd.md",
      "new_id": "733d70fff111be8abdd37e5a474a89bf46fdd974",
      "new_mode": 33188,
      "new_path": "gcc/config/loongarch/simd.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4fd4cec6af7fe3d360782ba8b339a0154640c98d",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/loongarch/vector/lasx/reduc-widen-sum.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "66c26974af3cb401037f79e133bfd157114f8d90",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/loongarch/vector/lsx/reduc-widen-sum.c"
    },
    {
      "type": "modify",
      "old_id": "ff0edfc946bc54176ea6627193b08e096cda6aeb",
      "old_mode": 33188,
      "old_path": "gcc/testsuite/lib/target-supports.exp",
      "new_id": "77537955cc09fd1d8e34ddbbb318bcc28807b847",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/lib/target-supports.exp"
    }
  ]
}
