)]}'
{
  "commit": "997a8a9bb85b615e9c1ec7fed802e203a6aaa4a3",
  "tree": "b1dc5cbddd419e793ae4cd5255917a00b5339ff3",
  "parents": [
    "373e2c30b1710e271664cf95fcfb66fea7dd15ed"
  ],
  "author": {
    "name": "Jakub Jelinek",
    "email": "jakub@redhat.com",
    "time": "Fri Jun 05 17:16:59 2026 +0200"
  },
  "committer": {
    "name": "Jakub Jelinek",
    "email": "jakub@gcc.gnu.org",
    "time": "Fri Jun 05 17:26:04 2026 +0200"
  },
  "message": "store-merging, riscv: Consider widen_bswap_or_bitreverse in store-merging decisions and fix up riscv build\n\nOn Fri, Jun 05, 2026 at 02:22:25PM +0200, Andreas Schwab wrote:\n\u003e This breaks riscv:\n\u003e\n\u003e ../../gcc/config/riscv/riscv.md:5297:14: error: bswapsi2 cannot FAIL\n\u003e ../../gcc/config/riscv/bitmanip.md:543:5: note: in expansion of macro \u0027FAIL\u0027\n\u003e   543 |     FAIL;\n\u003e       |     ^~~~\n\nwtw mentioned that on IRC.\nIn the way IFN_BSWAP/IFN_BITREVERSE are used currently (i.e. only used\nfor large/huge _BitInt or in the C++ FE, but not making it to expansion)\nthere is no reason why FAIL wouldn\u0027t be allowed (like before my changes),\nthough I find the riscv hack really ugly.\nInstead of adding a workaround, this patch removes the riscv hack and\ninstead adjusts store-merging pass to take into account\nwiden_bswap_or_bitreverse; currently it already takes into account\nexpand_doubleword_bswap_or_bitreverse (on 32-bit word targets which have\nbswapsi2 expanders expects __builtin_bswap64 to be cheap).  With this\npatch, it expects __builtin_bswap32 to be cheap if bswapdi2 expander\nis present, because widen_bswap_or_bitreverse will handle it as\n(subreg:SI (lshiftrt:DI (bswap:DI (subreg:DI (arg:SI) 0)) (const_int 32)) low)\n\n2026-06-05  Jakub Jelinek  \u003cjakub@redhat.com\u003e\n\n\t* gimple-ssa-store-merging.cc (maybe_optimize_vector_constructor):\n\tAlso support bswap32 if bswapdi2 expander is present.  Add comment\n\tabout bswap64 support on 32-bit targets with bswapsi2 expander.\n\t(pass_optimize_bswap::execute): Likewise.\n\t* config/riscv/bitmanip.md (bswapsi2): Change condition to disable\n\tthe expander on TARGET_64BIT without TARGET_XTHEADBB, never FAIL.\n\nReviewed-by: Richard Sandiford \u003crdsandiford@googlemail.com\u003e\nReviewed-by: Richard Biener \u003crguenth@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "05559405fcc966e2f2c5bdbbf78f0e7bdd1d22af",
      "old_mode": 33188,
      "old_path": "gcc/config/riscv/bitmanip.md",
      "new_id": "bd2aaf0587ebe58530cfc8840d0d5e976a387e90",
      "new_mode": 33188,
      "new_path": "gcc/config/riscv/bitmanip.md"
    },
    {
      "type": "modify",
      "old_id": "96fd9fa73a35bb6330adca41c4deed0d015d9eac",
      "old_mode": 33188,
      "old_path": "gcc/gimple-ssa-store-merging.cc",
      "new_id": "2e5232fa65fff802e69126a679aca9e841d27811",
      "new_mode": 33188,
      "new_path": "gcc/gimple-ssa-store-merging.cc"
    }
  ]
}
