)]}'
{
  "commit": "2fcbe075ec3b32f4a523ebae68a8a32381bb46a9",
  "tree": "2c1ccf973400a0502bf17e9f93ac4cb1fc0f7e89",
  "parents": [
    "cfc8ba7fa91eb7bf12fb7cd01542ddee2c337fb0"
  ],
  "author": {
    "name": "Richard Biener",
    "email": "rguenther@suse.de",
    "time": "Wed Jul 15 10:04:18 2026 +0200"
  },
  "committer": {
    "name": "Richard Biener",
    "email": "rguenth@gcc.gnu.org",
    "time": "Wed Jul 15 13:29:57 2026 +0200"
  },
  "message": "tree-optimization/126171 - SCEV and minus of INT_MIN\n\nThe following fixes the existing mitigation against UB for handling\nof subtraction of the most negative value in a type.  We\u0027ve only\nguarded the negation itself which is effective for avoiding UB in\nthat but it does not help in fixing a wrong scev_direction that\nresults from flipping the operation from minus to plus.  So the\npatch, instead of only promoting the negation to unsigned, promotes\nthe whole operation.\n\n\tPR tree-optimization/126171\n\t* tree-scalar-evolution.cc (scev_dfs::add_to_evolution):\n\tRemove code argument.  Remove MINUS_EXPR handling here.\n\t(scev_dfs::follow_ssa_edge_binary): Likewise.\n\t(scev_dfs::follow_ssa_edge_expr): Handle MINUS_EXPR\n\tseparately here, promoting the whole operation to unsigned\n\tinstead of just the addend.\n\n\t* gcc.dg/pr126171-1.c: New testcase.\n\t* gcc.dg/torture/pr126171-2.c: Likewise.\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4ac67c87c7d5b57c4549b216bac448b19c1e1e6c",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.dg/pr126171-1.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "82df6bfef9b3464ff7b01c73583e9be60e4dc327",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.dg/torture/pr126171-2.c"
    },
    {
      "type": "modify",
      "old_id": "279ff46474e487a166397096d661abfd215b338f",
      "old_mode": 33188,
      "old_path": "gcc/tree-scalar-evolution.cc",
      "new_id": "cd99cbe86ce5a0ec1aad7bb06bb7d695c1ade8e0",
      "new_mode": 33188,
      "new_path": "gcc/tree-scalar-evolution.cc"
    }
  ]
}
