)]}'
{
  "commit": "ce6a2e9349065db52a7e25808aefc97ddaef9cba",
  "tree": "103c043bd8a738bd17d60eb5889e61451bfe51d3",
  "parents": [
    "9d59dcff40a4f39ee82f9c59a67f9466d7a8bc66"
  ],
  "author": {
    "name": "Dominic P",
    "email": "gcc@gcc.dp11.uk",
    "time": "Thu Aug 13 20:46:26 2026 +0100"
  },
  "committer": {
    "name": "Richard Biener",
    "email": "rguenth@gcc.gnu.org",
    "time": "Tue Aug 18 10:12:31 2026 +0200"
  },
  "message": "match.pd: fold (t * u) % u to zero when the product cannot overflow\n\nA product t * u is an exact multiple of u, so t * u % u is zero under\nevery rounding convention whenever the multiplication does not wrap.\nFor signed types the overflow is undefined so this always holds; for\nothers use value ranges to prove the multiply is overflow-free, exactly\nas the neighbouring (t * u) / u -\u003e t already does.  This is the\nremainder counterpart of that fold, for all four modulo codes: the\nC family only produces TRUNC_MOD_EXPR, but Fortran\u0027s MODULO and Ada\u0027s\nmod produce the floor and ceiling forms, which fold equally.\n\nAssisted-by: Claude Opus 4.8 (Anthropic)\n\ngcc/ChangeLog:\n\n\t* match.pd ((t * u) % u -\u003e 0): New simplification.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.dg/fold-mod-mult-1.c: New test.\n\nSigned-off-by: Dominic P \u003cgcc@gcc.dp11.uk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "665e8eede7f24acfdbd6d96818abb2955e3800c8",
      "old_mode": 33188,
      "old_path": "gcc/match.pd",
      "new_id": "0c399a11f8de36153005a01111e405d538be4359",
      "new_mode": 33188,
      "new_path": "gcc/match.pd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9315e94822c45cc980ee77c55c6e7dfb08278e43",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.dg/fold-mod-mult-1.c"
    }
  ]
}
