)]}'
{
  "commit": "8d004ef91c4f7c315519975ffaec78d28d4a21ff",
  "tree": "8a0cf9def75b9ed4be73a01a72b0c6987dab9606",
  "parents": [
    "b6477e6c4efd6df2719190cb048cf300ff31af46"
  ],
  "author": {
    "name": "Andrea Pinski",
    "email": "andrew.pinski@oss.qualcomm.com",
    "time": "Mon Jul 27 23:02:07 2026 -0700"
  },
  "committer": {
    "name": "Andrea Pinski",
    "email": "andrew.pinski@oss.qualcomm.com",
    "time": "Thu Aug 13 23:52:58 2026 -0700"
  },
  "message": "match: Try to remove casts for `(int)-(unsigned)a`[PR107765]\n\nThis adds some extra checks to see if we can remove the casts\nfor signed integer overflow reasons while doing a negative.\nThis is needed more due to the recent patch which adds them\nin some cases.\n\nThis also changes TYPE_UNSIGNED to be TYPE_OVERFLOW_WRAPS to\nallow this to happen with -fwrapv too.\n\nChanges since v1:\n* Use expr_not_equal_to and simplify the if stmt.\nAlso use TYPE_OVERFLOW_WRAPS instead of TYPE_UNSIGNED.\n\nBootstrapped and tested on x86_64-linux-gnu.\n\n\tPR tree-optimization/107765\n\ngcc/ChangeLog:\n\n\t* match.pd (`(cast)-(cast)a`): Expand to\n\tuse expr_not_equal_to of INT_MIN.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.dg/tree-ssa/neg-cast-1.c: New test.\n\t* gcc.dg/tree-ssa/neg-cast-4.c: New test.\n\nSigned-off-by: Andrea Pinski \u003candrew.pinski@oss.qualcomm.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f43d2e79363b4ba79ae6b02f103ccc18630fc1c9",
      "old_mode": 33188,
      "old_path": "gcc/match.pd",
      "new_id": "4ddddc43bd7279dd3c911ca1b8d74f3e34c3ec59",
      "new_mode": 33188,
      "new_path": "gcc/match.pd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ec5d0e15251b03ea260f54f57014999f55bf3588",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.dg/tree-ssa/neg-cast-1.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fe3fe6a2eccfa3d8f03d4fe2c85af02b5b98ad63",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.dg/tree-ssa/neg-cast-4.c"
    }
  ]
}
