)]}'
{
  "commit": "b7fbc9e1a4ebb2f7f52dff4b8a57309847aaa90d",
  "tree": "cf56b9c5090620120e50bdeb6fe6a0c5a44f8a40",
  "parents": [
    "81a34bdbcb3e27a8fb2438fd90bbb76ec506fb40"
  ],
  "author": {
    "name": "Philipp Tomsich",
    "email": "philipp.tomsich@vrull.eu",
    "time": "Mon Aug 24 12:07:21 2026 +0200"
  },
  "committer": {
    "name": "Philipp Tomsich",
    "email": "philipp.tomsich@vrull.eu",
    "time": "Tue Aug 25 13:04:45 2026 +0200"
  },
  "message": "expmed: size \u0027op\u0027/\u0027log\u0027 for synth_mult\u0027s extend-then-discard [PR127031]\n\nsynth_mult accepts a sub-algorithm of up to MAX_BITS_PER_WORD\noperations from its recursive call and appends the current operation\nat index ops before the too-long check discards the result. That index\nis one past both arrays. The write to op[MAX_BITS_PER_WORD] aliases\nlog[0..3] and overwrites the shift counts of the algorithm being\nbuilt, and the write to log[MAX_BITS_PER_WORD] falls outside the\nstruct. The cache update just above the check reads op[] at the same\nindex.\n\nAVR reaches this at -O1/-O2, where MAX_BITS_PER_WORD is 8 and a SImode\nmultiply by a dense constant needs more operations than that:\n\n  uint32_t f (uint32_t x) { return x * 0xaaab; }\n\nSize the arrays for the transient state.\n\n\tPR middle-end/127031\n\ngcc/ChangeLog:\n\n\t* expmed.h (struct algorithm): Add one slot to the op and log\n\tarrays for the operation synth_mult appends to a full\n\tsub-algorithm before discarding it.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.target/avr/pr127031.c: New test.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "78f3f36e6615c9b3ee60f2b2247aaedda543928a",
      "old_mode": 33188,
      "old_path": "gcc/expmed.h",
      "new_id": "b4b44bba1d77b983fcbb3479ba16fc07dba2b728",
      "new_mode": 33188,
      "new_path": "gcc/expmed.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7f712897cea1d3ddcdb567c719f023efa9e506eb",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/avr/pr127031.c"
    }
  ]
}
