)]}'
{
  "commit": "896c822afed0aad4c0ca761777cdc5f0085bbce0",
  "tree": "4ea496cf2077110e77cc7fb3d06b0117e0628e36",
  "parents": [
    "964b279b15bc165056f7a57f43c7c1a95c135cf2"
  ],
  "author": {
    "name": "Jakub Jelinek",
    "email": "jakub@redhat.com",
    "time": "Thu May 28 10:28:12 2026 +0200"
  },
  "committer": {
    "name": "Jakub Jelinek",
    "email": "jakub@gcc.gnu.org",
    "time": "Thu May 28 10:58:37 2026 +0200"
  },
  "message": "i386: Fix up *add\u003cmode\u003e_1\u003cnf_name\u003e [PR125469]\n\nThe following testcase ICEs, because combine matches\n(set (reg:DI 108) (plus:DI (reg:DI 104 [ s ]) (subreg:DI (reg:TI 103 [ _2 ]) 8)))\nNow, because ix86_validate_address_register has:\n12038         /* Don\u0027t allow SUBREGs that span more than a word.  It can\n12039            lead to spill failures when the register is one word out\n12040            of a two word structure.  */\n12041         if (GET_MODE_SIZE (mode) \u003e UNITS_PER_WORD)\n12042           return NULL_RTX;\nthis isn\u0027t recognized as *leadi, but is recognized as *adddi_1_nf pattern\ninstead.  Now, later on the RA turns it into:\n(set (reg:DI 2 cx [108]) (plus:DI (reg:DI 0 ax [orig:104 s ] [104]) (reg:DI 5 di [ _2+8 ])))\nwhich would be valid *leadi, but given that INSN_CODE is already set to the\n*adddi_1_nf and that also satisfies it, nothing re-recognizes it as *leadi.\nBut in that case without TARGET_APX_NDD the pattern has return \"#\";\nThat is a bug, because there is no splitter to split that\n(set (reg:DI 2 cx [108]) (plus:DI (reg:DI 0 ax [orig:104 s ] [104]) (reg:DI 5 di [ _2+8 ])))\ninto itself so that it is re-recognized as *leadi, so it just ICEs.\nI think having a splitter to split to the same thing would be just weird, so\nthis just outputs lea insn directly.\n\n2026-05-28  Jakub Jelinek  \u003cjakub@redhat.com\u003e\n\n\tPR target/125469\n\t* config/i386/i386.md (*add\u003cmode\u003e_1\u003cnf_name\u003e): Don\u0027t return \"#\" for\n\tthe lea non-TARGET_APX_NDD case, instead emit a lea directly.\n\n\t* gcc.target/i386/apx-nf-pr125469.c: New test.\n\nReviewed-by: Uros Bizjak \u003cubizjak@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "063e14cb2c179111728d642c5f8d824417d57492",
      "old_mode": 33188,
      "old_path": "gcc/config/i386/i386.md",
      "new_id": "20d57c69bd3b05262e48c8dfadd670a10a7f3bfb",
      "new_mode": 33188,
      "new_path": "gcc/config/i386/i386.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "dc9f1c241abeb255e6c5d8a47601bce4252ac494",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/i386/apx-nf-pr125469.c"
    }
  ]
}
