)]}'
{
  "commit": "d7d165cbf7602f40da703f7a269b5ce60fef5376",
  "tree": "b2c98ff32a747071c59d83a9121b8cd75eb437cc",
  "parents": [
    "5a36eba66d7e2585aac387683ff943174d7887b7"
  ],
  "author": {
    "name": "Luke Lau",
    "email": "luke@igalia.com",
    "time": "Fri May 15 17:42:16 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri May 15 17:42:16 2026 +0100"
  },
  "message": "[RISCV] Fix mask policy in convertSameMaskVMergeToVMv (#197937)\n\nIn convertSameMaskVMergeToVMv, we try to change a vmerge to a vmv.v.v if\nthe true operand is masked in such a way it guarantees the masked off\nelements are the same.\n\nHowever vmerge.vvm and vmv.v.v are always mask undisturbed. If we want\nto reuse the masking in the true operand we need to also change its\npolicy to mask undisturbed.\n\nThis fixes a miscompile that can be seen with llvm.masked.sdiv\ninstructions after #191377 under certain conditions, detected by\nhttps://lab.llvm.org/buildbot/#/builders/214/builds/2795. The\nllvm.masked.sdiv instructions produced a mask agnostic PseudoVDIV that\nhad a PseudoVMERGE_VVM merged into them without updating the policy.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4a03932313b8a4b4220db7c6228f3ab4915136e3",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp",
      "new_id": "74ac1fc3a1e3895c3ce438ab9c24bdd005e41b0c",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp"
    },
    {
      "type": "modify",
      "old_id": "192c8381c42c337a93d2d0aff965fdb7968cdd6c",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-to-vmv.mir",
      "new_id": "b74aad5e494b09cb631e91b4b52e6fd8a340f19a",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-to-vmv.mir"
    },
    {
      "type": "modify",
      "old_id": "1d096f81a6828df22211b7c4bd8b7f8a940577b7",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/RISCV/rvv/rvv-vmerge-to-vmv.ll",
      "new_id": "70521b9130258a370221b920ca912be24adf9ff3",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/RISCV/rvv/rvv-vmerge-to-vmv.ll"
    }
  ]
}
