)]}'
{
  "commit": "6bbe931ea0e8f412c81fed8a3df4a07df97821f4",
  "tree": "16383c3504d72b5614ede5b44047c9a0a3d5ed41",
  "parents": [
    "b3ade4e315e5bab56eced1e22eceabbf1a8f15c4"
  ],
  "author": {
    "name": "Kyrylo Tkachov",
    "email": "ktkachov@nvidia.com",
    "time": "Fri Jun 12 00:00:00 2026 +0000"
  },
  "committer": {
    "name": "Kyrylo Tkachov",
    "email": "ktkachov@nvidia.com",
    "time": "Sat Jun 13 09:48:49 2026 +0200"
  },
  "message": "match.pd: fold (0/1) * -(0/1) into -((0/1) \u0026 (0/1))\n\nFor operands known to be in the range [0, 1], multiplying a 0/1 value by a\nnegated 0/1 value is the negation of their bitwise AND:\n\n  x * -y \u003d\u003d -(x \u0026 y)   when x, y are in { 0, 1 }.\n\nThis complements the existing \"{ 0, 1 } * { 0, 1 } -\u003e { 0, 1 } \u0026 { 0, 1 }\"\nsimplification, which does not handle a negated operand.  For the\ncomparison-derived 0/1 masks produced by if-conversion this exposes a plain\nbitwise AND of the original conditions to later passes (replacing a\nCOND_EXPR).\n\nThis triggers a few times in astcenc in SPEC2026 where it simplifies the\ncodegen of one of the hot kernels and gives a ~2.4% improvement on\naarch64, though the real winners for that kernel are described in\nPR125750. This is just a small cleanup.\n\nSigned-off-by: Kyrylo Tkachov \u003cktkachov@nvidia.com\u003e\n\ngcc/ChangeLog:\n\n\tPR tree-optimization/125750\n\t* match.pd (mult of a 0/1 value by a negated 0/1 value): New\n\tsimplification.\n\ngcc/testsuite/ChangeLog:\n\n\tPR tree-optimization/125750\n\t* g++.dg/tree-ssa/mult-negate-zeroone-1.C: New test.\n\t* g++.dg/tree-ssa/mult-negate-zeroone-2.C: New test.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ea4a447f0814770dce428559a003b697d50bd014",
      "old_mode": 33188,
      "old_path": "gcc/match.pd",
      "new_id": "92607189619451a643cfbe56bfcb505a404785e1",
      "new_mode": 33188,
      "new_path": "gcc/match.pd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "002b2d697c59812295fcffddc8371b73352171fe",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/tree-ssa/mult-negate-zeroone-1.C"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "736e664be1fae35abcb142b0c434449758150e74",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/g++.dg/tree-ssa/mult-negate-zeroone-2.C"
    }
  ]
}
