)]}'
{
  "commit": "ec79b0779b6eeb9ef3b8a45f46a596cbb75a7844",
  "tree": "e0a995d5e54463d60cdb8c9016900a3c23066d5b",
  "parents": [
    "bd02a048e92a778c2d3fcc011b8a88e1ac6f8183"
  ],
  "author": {
    "name": "Andrew Pinski",
    "email": "andrew.pinski@oss.qualcomm.com",
    "time": "Wed May 20 13:20:15 2026 -0700"
  },
  "committer": {
    "name": "Andrew Pinski",
    "email": "andrew.pinski@oss.qualcomm.com",
    "time": "Tue May 26 13:00:07 2026 -0700"
  },
  "message": "tree-cfgcleanup: Don\u0027t remove forwarder blocks (with phis) with phis that have abnormal uses [PR125396]\n\nThis was a latent bug in the checks for removing of a forwarder block which has a phi.\n\nTake:\n      \u003cbb 15\u003e [local count: 182536112]:\n      # arr1$0_32 \u003d PHI \u003carr1$0_36(ab)(11)\u003e\n\n      \u003cbb 14\u003e [local count: 206998870]:\n      # arr1$0_43(ab) \u003d PHI \u003carr1$0_25(ab)(13), 9(15)\u003e\n      # sj12_44(ab) \u003d PHI \u003csj12_31(ab)(13), arr1$0_32(15)\u003e\n      f8 ();\n\nHere bb 15 predecessor is a normal edge.\nSo when merging the forwarder bb 15 into bb14 we end up with:\n      \u003cbb 12\u003e [local count: 206998870]:\n      # arr1$0_42(ab) \u003d PHI \u003carr1$0_24(ab)(11), 9(9)\u003e\n      # sj12_43(ab) \u003d PHI \u003csj12_30(ab)(11), arr1$0_35(ab)(9)\u003e\n      f8 ();\nand now there is an overlap of live range of arr1$0_35 and arr1$0_42.\nSo we need to reject the case where we have phis and the phi arguments that\nuse abnormal uses.\n\nChanges since v1:\n* v2: Look at phi arguments of the forwarder block rather than the dest bb\n      having an abnormal edge out.\n* v3: Fix bb_phis_references_abnormal_uses to use the gimple_phi_num_args to\n      search over the phi arguments. Also fix the commit message which was wrong.\n\nBootstrapped and tested on x86_64-linux-gnu.\n\n\tPR tree-optimization/125396\n\ngcc/ChangeLog:\n\n\t* tree-cfgcleanup.cc (bb_phis_references_abnormal_uses): New function.\n\t(maybe_remove_forwarder_block): Check to make sure the\n\tforwarder block does not have a phi that references ssa name that has\n\tabnormal uses.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.dg/torture/pr125396-1.c: New test.\n\nSigned-off-by: Andrew Pinski \u003candrew.pinski@oss.qualcomm.com\u003e\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b0557d2f03f07e7e7bd29c7534fada99123b723e",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.dg/torture/pr125396-1.c"
    },
    {
      "type": "modify",
      "old_id": "85b9a3cedaa243dc249b5cdfb6c145c68d0e3d3d",
      "old_mode": 33188,
      "old_path": "gcc/tree-cfgcleanup.cc",
      "new_id": "0f47f13591c1b8595bc6e4f5f2e5c8c5f90a529f",
      "new_mode": 33188,
      "new_path": "gcc/tree-cfgcleanup.cc"
    }
  ]
}
