)]}'
{
  "commit": "2ed77dddba2e7f2d4e45ee8606e9b22acb6fb1f3",
  "tree": "7ff65ca94dc2276669babca4dddce0add35852f5",
  "parents": [
    "1320bc377dab63d1c9a83662c49d01f3a166332c"
  ],
  "author": {
    "name": "Kyrylo Tkachov",
    "email": "ktkachov@nvidia.com",
    "time": "Thu Jul 30 18:13:06 2026 +0200"
  },
  "committer": {
    "name": "Kyrylo Tkachov",
    "email": "ktkachov@nvidia.com",
    "time": "Mon Sep 14 12:46:30 2026 +0200"
  },
  "message": "match-sat-alu.pd: Recognize more unsigned saturating subtraction forms\n\nEquivalent unsigned saturating subtraction forms can reverse the comparison\noperands or the conditional arms:\n\n  B \u003c A ? A - B : 0\n  A \u003c B ? 0 : A - B\n\nThe middle end can keep either comparison operand order.  Control flow with\ntwo returns can also reverse the conditional arms.\n\nRecognize both forms and reversed comparisons in the multiply-by-predicate\nform.\n\nAArch64 -O2:\n\nbefore:\n\n\tsub\tw2, w0, w1\n\tcmp\tw1, w0\n\tcsel\tw0, w2, wzr, cc\n\nafter:\n\n\tsubs\tw0, w0, w1\n\tcsel\tw0, w0, wzr, cs\n\nThe vector form replaces a comparison, a subtraction, and an AND with one\nUQSUB.\n\nBootstrapped and tested on aarch64-none-linux-gnu.\n\ngcc/ChangeLog:\n\n\t* match-sat-alu.pd (unsigned_integer_sat_sub): Accept commuted\n\tcomparison operand orders and the arm order from a two-return source.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.target/aarch64/sat_u_sub_swapped-1.c: New test.\n\nSigned-off-by: Kyrylo Tkachov \u003cktkachov@nvidia.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "45f74ca5ace8274a26150413b09e78a691770e16",
      "old_mode": 33188,
      "old_path": "gcc/match-sat-alu.pd",
      "new_id": "9cbea1e668bb485ec940dd63fd7dd4bba6d33c38",
      "new_mode": 33188,
      "new_path": "gcc/match-sat-alu.pd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fb42b6b07e372b45e705a2746e5513673774e971",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/aarch64/sat_u_sub_swapped-1.c"
    }
  ]
}
