)]}'
{
  "commit": "09b08855698fbfedb5ad0726cb97a5dfc33ad46a",
  "tree": "b8bec3ab4560fc76641428b6176b4d5ec72a9ae0",
  "parents": [
    "15d7c01f30cb86bbc2638d8dc1b98eb283d4e184"
  ],
  "author": {
    "name": "Nikita Popov",
    "email": "npopov@redhat.com",
    "time": "Thu Dec 04 16:24:23 2025 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Dec 04 15:24:23 2025 +0000"
  },
  "message": "[LangRef] Specify icmp on pointers to only compare address (#163936)\n\nThis changes LangRef to specify that pointer icmp only compares the\naddress bits of the pointers. That is, `icmp pred %a, %b` is equivalent\nto `icmp pred ptrtoaddr(%a), ptrtoaddr(%b)`.\n\nSimilarly, it specifies that the `nonnull` attribute requires that the\naddress bits are non-zero.\n\nThere are a couple of motivations for this:\n\n* For inequality comparisons, this is really the only sensible\nsemantics. Relational comparison of address and metadata bits as a\nsingle integer is generally meaningless (unless the metadata bits are\nequal).\n* This matches (as far as I understand) the behavior of existing CHERI\nimplementations.\n* LLVM can only reason about the address bits. These semantics allow\npointers with non-address bits to receive essentially the same\ncomparison optimization support as ordinary pointers.\n\nIn terms of implementation, this PR adjusts:\n * The AMDGPULowerBufferFatPointers pass.\n* An InstCombine fold that may replace pointers with different\nnon-address bits.\n * The fold that replaces pointers based on dominating pointer equality.\n\nIt does not adjust:\n* ISel, because we don\u0027t have in-tree targets where we can show a\ndifference.\n* Various icmp+ptrtoint transforms, because we\u0027ll have to change this\ncode for ptrtoaddr optimization support anyway, and these changes are\ntightly related.\n\nRelated discussion starting from:\nhttps://discourse.llvm.org/t/clarifiying-the-semantics-of-ptrtoint/83987/60?u\u003dnikic",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "656b930e1f5ca405c9227924a9c7631c9d80c0d8",
      "old_mode": 33188,
      "old_path": "llvm/docs/LangRef.rst",
      "new_id": "b8ed1dba6303e2426525be2858c095d57a9a0636",
      "new_mode": 33188,
      "new_path": "llvm/docs/LangRef.rst"
    },
    {
      "type": "modify",
      "old_id": "54f55b20a93acddea3b98a644efe34c08be3c911",
      "old_mode": 33188,
      "old_path": "llvm/lib/Analysis/Loads.cpp",
      "new_id": "73f40f13a262333de2d8d1b042abd8845951f530",
      "new_mode": 33188,
      "new_path": "llvm/lib/Analysis/Loads.cpp"
    },
    {
      "type": "modify",
      "old_id": "fdff21b6ef8df7b626c356f81d951b3657e1e3a1",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp",
      "new_id": "e9bcf16025d58e062d38fd7d23dd460ebeec4a39",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp"
    },
    {
      "type": "modify",
      "old_id": "5bc9c28bed141290a782347e8ceecf892d4669bd",
      "old_mode": 33188,
      "old_path": "llvm/lib/Transforms/InstCombine/InstructionCombining.cpp",
      "new_id": "c6de57cb34c6999e97c8dd9aabe5abde43311199",
      "new_mode": 33188,
      "new_path": "llvm/lib/Transforms/InstCombine/InstructionCombining.cpp"
    },
    {
      "type": "modify",
      "old_id": "610c3e2c02867b1a7498f4e1338e2fcb3df5d241",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-pointer-ops.ll",
      "new_id": "01d2c1c356cb5dad1e8440f41f5480ef6b666edc",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-pointer-ops.ll"
    },
    {
      "type": "modify",
      "old_id": "a38980169fc5228c2887159af371a77deac8563d",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/GVN/assume-equal.ll",
      "new_id": "d2a584e891703db1393c747a6ab65c75e90557b7",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/GVN/assume-equal.ll"
    },
    {
      "type": "modify",
      "old_id": "adf3aa12623b9bd9f598f3b16057bde4780b0b11",
      "old_mode": 33188,
      "old_path": "llvm/test/Transforms/InstCombine/ptrtoaddr.ll",
      "new_id": "f33fa5089d8d01f19de91d37c8a2a0a5b98f13a8",
      "new_mode": 33188,
      "new_path": "llvm/test/Transforms/InstCombine/ptrtoaddr.ll"
    }
  ]
}
