)]}'
{
  "commit": "6adef02db58873b1ef5cd2fac967bf1072567751",
  "tree": "d095e93c0d09baeea160c47d885d501f994e96ff",
  "parents": [
    "94d9d9c76201058378a8a74f49b7b057f695ccc4"
  ],
  "author": {
    "name": "Henry Baba-Weiss",
    "email": "henry.babaweiss@gmail.com",
    "time": "Mon Apr 13 13:03:39 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Apr 13 13:03:39 2026 -0700"
  },
  "message": "[X86][regcall] Rework struct classification for non-Windows x86-64 targets (#187134)\n\nCurrently, when `X86_64ABIInfo::classifyRegCallStructTypeImpl`\nclassifies a struct argument or return value as direct, it leaves the\nLLVM IR coerce type unspecified, implicitly relying on\n`CodeGenTypes::ConvertType` to eventually construct a default IR type\nbased on the struct\u0027s layout. This conversion is neither stable nor\nguaranteed to adhere to the ABI\u0027s classification rules.\n\nInstead, rewrite `classifyRegCallStructTypeImpl` to construct an\nexplicit sequence of coerce types, using the existing field\nclassification to obtain a coerce type for each member of the struct.\nAlso, rename the function to `passRegCallStructTypeDirectly` and return\na boolean instead, so that now `classifyRegCallStructType` is the only\nplace that computes `ABIArgInfo`.\n\nThis rewrite also fixes several other issues with the `X86_64ABIInfo`\nimplementation of `__regcall`:\n\n* Empty structs are now ignored instead of being misclassified as\ndirect.\n* Arrays are now classified specially based on the element type, since\n`X86_64ABIInfo::classifyArgumentType` ignores standalone array types.\n* SSE registers used for return values are now correctly reused for\narguments, matching the 64-bit Windows behavior.\n\nSince this is an ABI change, it has the potential to cause\nincompatibilities with `__regcall` code compiled by earlier versions of\nClang. Specifically:\n\n* Because SSE return registers can now be reused as argument registers,\nfunctions will now pass more floating point arguments in SSE registers.\n* `_Complex float` struct fields are now passed in one SSE register\ninstead of two.\n\nFixes #62999\nFixes #98635",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "51f2c8bf70194d57f20d8681351cc53a8c4f2f17",
      "old_mode": 33188,
      "old_path": "clang/docs/ReleaseNotes.rst",
      "new_id": "1db1d9fea6b9847c58b50df38c5da0e550ca9ad2",
      "new_mode": 33188,
      "new_path": "clang/docs/ReleaseNotes.rst"
    },
    {
      "type": "modify",
      "old_id": "e6203db8bc245e4f62a3a705e911e551756e6979",
      "old_mode": 33188,
      "old_path": "clang/lib/CodeGen/Targets/X86.cpp",
      "new_id": "4a57ca7767bd2cbaa67af490ecd3b78f10fefadd",
      "new_mode": 33188,
      "new_path": "clang/lib/CodeGen/Targets/X86.cpp"
    },
    {
      "type": "modify",
      "old_id": "bd7a06c1d4120731305795aadd103ac823561e28",
      "old_mode": 33188,
      "old_path": "clang/test/CodeGen/regcall.c",
      "new_id": "cf6f324cdefc75a3924f5ed632a12018c3027ed3",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGen/regcall.c"
    },
    {
      "type": "modify",
      "old_id": "d05b4e0126e304cc6afc2473c2b8567b6bbcc8cd",
      "old_mode": 33188,
      "old_path": "clang/test/CodeGen/regcall4.c",
      "new_id": "296b0712792051a2b4c5776a44bb26b0ad18493a",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGen/regcall4.c"
    },
    {
      "type": "modify",
      "old_id": "1ff7597e9deef8e79bcf2fb99f829cbbfa96669c",
      "old_mode": 33188,
      "old_path": "clang/test/CodeGenCXX/regcall.cpp",
      "new_id": "99cc165389a1b903eb1d55bb099c6f3c3439355d",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGenCXX/regcall.cpp"
    },
    {
      "type": "modify",
      "old_id": "2ecd5b4951c757e020c2c2c11974af09b3074dd4",
      "old_mode": 33188,
      "old_path": "clang/test/CodeGenCXX/regcall4.cpp",
      "new_id": "fb170ac0069161e3a9c4f87ee23ea89f96db3f49",
      "new_mode": 33188,
      "new_path": "clang/test/CodeGenCXX/regcall4.cpp"
    }
  ]
}
