)]}'
{
  "commit": "1a29fdbdcb6775cd93bfc23426bf4e8b6b0475d2",
  "tree": "03b645041fcc888f3a265cca0eb09a16f1fb879f",
  "parents": [
    "a3fb4bf350d6b7bea7aa04efcf9c584e6a9d93df"
  ],
  "author": {
    "name": "Jin Ma",
    "email": "jinma@linux.alibaba.com",
    "time": "Tue Aug 18 23:31:24 2026 +0800"
  },
  "committer": {
    "name": "Jin Ma",
    "email": "jinma@linux.alibaba.com",
    "time": "Fri Aug 21 23:41:13 2026 +0800"
  },
  "message": "RISC-V: Fix sub-Pmode index in vec_set/vec_extract [PR126873]\n\nWhen gimple-isel lowers a variable-index element access on a\nfixed-length vector into .VEC_SET or .VEC_EXTRACT, the index may be\nnarrower than Pmode.  The vec_set and vec_extract expanders used\ngen_lowpart to convert it to Pmode, which only reinterprets the\nregister and drops the source-level truncation.  The full 64-bit\nvalue is then used as the slide amount of vslideup/vslidedown and\nwrong code is generated.\n\nFix this by zero-extending a sub-Pmode index with convert_to_mode\ninstead.\n\n\tPR target/126873\n\ngcc/ChangeLog:\n\n\t* config/riscv/autovec.md (vec_set\u003cmode\u003e): Zero-extend a\n\tsub-Pmode index to Pmode.\n\t(vec_extract\u003cmode\u003e\u003cvel\u003e): Likewise.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.target/riscv/pr126873.c: New test.\n\nReported-by: XChy \u003cxxs_chy@outlook.com\u003e\nSigned-off-by: Jin Ma \u003cjinma@linux.alibaba.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "964eed927c825f74415a7e816b205d5ab2c4d83f",
      "old_mode": 33188,
      "old_path": "gcc/config/riscv/autovec.md",
      "new_id": "16d08cae30be3471df7a7f81fbb3346be3321c2e",
      "new_mode": 33188,
      "new_path": "gcc/config/riscv/autovec.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "eab525d0cf20fabad3f00c0f9e22fe2640e63dd7",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/riscv/pr126873.c"
    }
  ]
}
