)]}'
{
  "commit": "8742022ec74c54f1415707261ccc2054a3decd5f",
  "tree": "92ef2cf89b847e3bf4815af260a502d16654d17e",
  "parents": [
    "b38c23b4c199221af9e043041f2e594ec1e3745b"
  ],
  "author": {
    "name": "Philip Reames",
    "email": "preames@rivosinc.com",
    "time": "Thu Mar 27 08:12:03 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Mar 27 08:12:03 2025 -0700"
  },
  "message": "[RISCV] Canonicalize foldable branch conditions in optimizeCondBranch (#132988)\n\noptimizeCondBranch isn\u0027t allowed to modify the CFG, but it can rewrite\nthe branch condition freely. However, If we could fold a conditional\nbranch to an unconditional one (aside from that restriction), we can\nalso rewrite it into some canonical conditional branch instead.\n\nLooking at the diffs, the only cases this catches in tree tests are\ncases where we could have constant folded during lowering from IR, but\ndidn\u0027t. This is inspired by trying to salvage code from\nhttps://github.com/llvm/llvm-project/pull/131684 which might be useful.\nGiven the test impact, it\u0027s of questionable merits. The main advantage\nover only the late cleanup pass is that it kills off the LIs for the\nconstants early - which can help e.g. register allocation.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d6dfa4cabe35c3b43ac6c7d2dd1e083f4bbd0139",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/RISCV/RISCVInstrInfo.cpp",
      "new_id": "84e44571a451a710d1d3b1bbf6299fc0b311614c",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/RISCV/RISCVInstrInfo.cpp"
    },
    {
      "type": "modify",
      "old_id": "51ea8873d8c031f65b18c805b63bb8492917e23a",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/bfloat-br-fcmp.ll",
      "new_id": "2e8cf35a294f658efe69c728056ca4b5d0a50e84",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/bfloat-br-fcmp.ll"
    },
    {
      "type": "modify",
      "old_id": "035228e73c707148cab6a9e669b35be68ca5060d",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/double-br-fcmp.ll",
      "new_id": "42f1b1360a2d36a081272262c0f3375c1c34c016",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/double-br-fcmp.ll"
    },
    {
      "type": "modify",
      "old_id": "35caa627b57bc3c16a354408319693a2ba9084df",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/float-br-fcmp.ll",
      "new_id": "00da1cc1c8bbea6d81f91809ca7ca805ba1284ae",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/float-br-fcmp.ll"
    },
    {
      "type": "modify",
      "old_id": "e9b142e33362fa42bf3a7359fb0c154e2b50caa4",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/half-br-fcmp.ll",
      "new_id": "1cee927662c140fa65638b335db4ab9092ad2011",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/half-br-fcmp.ll"
    },
    {
      "type": "modify",
      "old_id": "eb84774014a4bb2b59edfe0e157b0b3a8dec68f4",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/machine-sink-load-immediate.ll",
      "new_id": "4947423971c6b8b7e622a727efb4cc2592570e87",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/machine-sink-load-immediate.ll"
    }
  ]
}
