)]}'
{
  "commit": "f801b6f67ea896d6e4d2de38bce9a79689ceb254",
  "tree": "6764eadb3145f34f7136b213f92090fa985acd65",
  "parents": [
    "710a5873fbf43d312555a1ddbafafa10f44f576e"
  ],
  "author": {
    "name": "Nikita Popov",
    "email": "npopov@redhat.com",
    "time": "Thu Oct 23 11:57:24 2025 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Oct 23 11:57:24 2025 +0200"
  },
  "message": "[InstCombine] Add support for ptrtoaddr in pointer difference folds (#164428)\n\nThis adds support for folding `ptrtoaddr(p2) - ptrtoaddr(p)` pointer\nsubtractions. We can treat ptrtoaddr the same as ptrtoint as the\ntransform is truncation safe anyway (and in fact supports explicit\ntruncation as well).\n\nThe only interesting case is the subtraction of zext of ptrtoaddr. For\nthis transform it\u0027s important that the address bits are not truncated --\nand if any pointer bits are truncated, that the truncation is consistent\nfor both operands. I\u0027ve explicitly spelled out the three different cases\nfor this, which also fixes a miscompile in the existing ptrtoint fold.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "73ec4514f841473c169e47fa40445c2900776240",
      "old_mode": 33188,
      "old_path": "llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp",
      "new_id": "9bee523c7b7e5f2ba2194ee2b29b6509fbdfa244",
      "new_mode": 33188,
      "new_path": "llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp"
    },
    {
      "type": "modify",
      "old_id": "410c43c807ed93714bc829626318b0c6b3bc37c1",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/InstCombine/ptrtoaddr.ll",
      "new_id": "f19cca8f808c88454bdcaec7187466d679debeec",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/InstCombine/ptrtoaddr.ll"
    },
    {
      "type": "modify",
      "old_id": "8eeaea1533bcfe3f18501c12fcb47368e353eb16",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/InstCombine/sub-gep.ll",
      "new_id": "ee70137e8fbd7c23105c2ef41092302b25ead0c9",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/InstCombine/sub-gep.ll"
    }
  ]
}
