)]}'
{
  "commit": "f6b00aefc25a25ade7524649605fa83fba80c119",
  "tree": "f8a320ad431cc006e47895a2588982654c604a3c",
  "parents": [
    "7b4d5b42a78859b30c9b48fa0a426effbbd71ff7"
  ],
  "author": {
    "name": "Kyrylo Tkachov",
    "email": "ktkachov@nvidia.com",
    "time": "Wed Jul 22 16:45:51 2026 +0200"
  },
  "committer": {
    "name": "Kyrylo Tkachov",
    "email": "ktkachov@nvidia.com",
    "time": "Sat Jul 25 10:33:23 2026 +0200"
  },
  "message": "ifcvt: Keep only reaching definitions when rewiring sets [PR126184]\n\ninit_noce_multiple_sets_info records earlier SET destinations that are\nmentioned by a later SET source.  When a pseudo is set more than once, only\nits most recent prior definition reaches that source.\n\nRecording every definition is unsafe in the second\nnoce_convert_multiple_sets_1 attempt.  The newest definition can be emitted\ndirectly into its target pseudo, making its replacement a no-op.  A later\nreplacement using an older definition then substitutes a stale value.\n\nPR126184 contains the following dependency chain:\n\n  c \u003d x + 1;\n  x \u003d c * y;\n  c \u003d z + 3;\n  y \u003d c * x;\n\nThe unfixed conversion computes the last multiply with the temporary that\nholds `x + 1`, rather than the reaching `z + 3` value.\n\nThe unfixed final sequence forms `x + 1` in x0 and later uses x0 as the\nmultiply operand:\n\n  add     x0, x1, 1\n  csel    x1, x1, x3, eq\n  mul     x0, x1, x0\n\nWith the fix, x3 retains z until `z + 3` is formed and used by the multiply:\n\n  add     x3, x3, 3\n  csel    x0, x0, x1, ne\n  mul     x3, x0, x3\n\nWalk definitions from newest to oldest and record only the first match for\neach pseudo.  Add an AArch64 execution test for the reported dependency.\n\nBootstrapped and tested on aarch64-none-linux-gnu and\nx86_64-pc-linux-gnu.\n\ngcc/ChangeLog:\n\n\tPR rtl-optimization/126184\n\t* ifcvt.cc (init_noce_multiple_sets_info): Record only the most\n\trecent prior definition of each pseudo register.\n\ngcc/testsuite/ChangeLog:\n\n\tPR rtl-optimization/126184\n\t* gcc.target/aarch64/pr126184.c: New test.\n\nSigned-off-by: Kyrylo Tkachov \u003cktkachov@nvidia.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5c5580de9d12a56c2dcc98543fac3fc9bee2bf94",
      "old_mode": 33188,
      "old_path": "gcc/ifcvt.cc",
      "new_id": "5ea25f8fbe719e4c22d08f1441cd0bc3e12f8208",
      "new_mode": 33188,
      "new_path": "gcc/ifcvt.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "920d47401ab13940282e8458055abd7dad214ed5",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/aarch64/pr126184.c"
    }
  ]
}
