)]}'
{
  "commit": "4fffee037520f3f514d5e2d6a40e26648fdb92e2",
  "tree": "c842e6f4648f9b00bc22075d5206739133255a69",
  "parents": [
    "525e4842c3bf0557cb1a3dfd187c391adbe7717b"
  ],
  "author": {
    "name": "Brian Cain",
    "email": "brian.cain@oss.qualcomm.com",
    "time": "Tue Mar 10 09:16:46 2026 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Mar 10 09:16:46 2026 -0500"
  },
  "message": "[Hexagon] Fix 64-bit funnel shift miscompilation with register shift amounts (#183669)\n\n64-bit regpair shift amounts are treated as signed 7-bits, so a\ncomplement\nshift amount of 64 (when the primary amount is 0) is sign-extended to\n-64,\nreversing the shift direction and producing incorrect results. This\naffected\nany 64-bit rotate or funnel shift where the runtime shift amount could\nbe 0\n(making the complement 64) or \u003e\u003d 64.\n    \nFix by masking the shift amount to [0, 63] and computing the complement\nas\n(m - 64), which is always in [-64, -1]. Using lsl/lsr (logical shift)\ninstructions with this negative amount causes the hardware to reverse\nthe\nshift direction while zero-filling vacated positions:\n    \nfshl(a, b, amt) \u003d (a \u003c\u003c m) | lsl(b, m - 64) // lsl reverses to lsr\nfshr(a, b, amt) \u003d (b \u003e\u003e m) | lsr(a, m - 64) // lsr reverses to lsl\n    \nwhere m \u003d amt \u0026 63. The logical shift instructions (lsl/lsr) are used\ninstead of arithmetic (asl) because asl with a negative amount performs\nan\narithmetic right shift that sign-extends, which would corrupt the result\nfor negative source values.\n    \nWhen m \u003d 0, the complement amount is -64 (magnitude 64), which shifts\nall\n64 bits out and produces zero, so the complement term vanishes as\nrequired.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6f4dccac45728df92ed8a1a1cfd272a10201b584",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/Hexagon/HexagonPatterns.td",
      "new_id": "3f836e8c1dbefcf6ac6d66273b9fe4765bcbc05d",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/Hexagon/HexagonPatterns.td"
    },
    {
      "type": "modify",
      "old_id": "5c318dfb6066ea5652f4fe8b72d668fd35b161c0",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/Hexagon/funnel-shift.ll",
      "new_id": "5c859323feaeed0598c73035ab6ec35e96ba240e",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/Hexagon/funnel-shift.ll"
    },
    {
      "type": "modify",
      "old_id": "19af539ed966fc9dc3b05f92606a06ec6c633eb6",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/Hexagon/rotate.ll",
      "new_id": "14bddab09303b4528618cdc4b66678c6946ff2c5",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/Hexagon/rotate.ll"
    }
  ]
}
