)]}'
{
  "commit": "1fb998f8839b31e91fb154bbf052e9470f083ef6",
  "tree": "b4c334334b284d833199779e275a30fcf5d6a1b5",
  "parents": [
    "efaac8c970280825f413aa4501bc7a0d5328afbd"
  ],
  "author": {
    "name": "Abhishek Kaushik",
    "email": "abhishek.kaushik@arm.com",
    "time": "Tue Jun 16 07:43:50 2026 -0600"
  },
  "committer": {
    "name": "Jeff Law",
    "email": "jeffrey.law@oss.qualcomm.com",
    "time": "Tue Jun 16 07:43:50 2026 -0600"
  },
  "message": "[PATCH] tree-optimization: Query ranger on edge for niter bound expressions\n\ndetermine_value_range only queried ranger when VAR was an SSA_NAME.\nHowever, number_of_iterations_exit_assumptions calls\nexpand_simple_operations on the IV bases before asking for the range.\nThis can expose simple GENERIC expressions, including conversions, even\nwhen the original value had an SSA_NAME with useful range information.\n\nRanger can analyze such expressions at a program point or edge, so query\nit for integral bound expressions on the loop preheader edge rather than\nrestricting the query to SSA_NAMEs.  This lets niter analysis recover the\nnarrower range for value-preserving conversions such as uint8_t to int,\nwhile still handling non-value-preserving conversions and wrapping\nexpressions conservatively.\n\nThe new test covers a direct converted uint8_t bound, a masked uint16_t\nbound whose useful range comes from ranger, a guarded uint16_t bound\nwhose range is context-sensitive, a non-value-preserving uint8_t to\nint8_t conversion, and a wrapping unsigned expression.\n\nBootstrapped and regression tested on aarch64-unknown-linux-gnu.\n\ngcc/ChangeLog:\n\n\t* tree-ssa-loop-niter.cc (determine_value_range): Query ranger\n\tfor integral expressions, not only SSA_NAMEs.  Query ranges on the\n\tloop preheader edge.\n\ngcc/testsuite/ChangeLog:\n\n\t* gcc.target/aarch64/sve2/niter-convert-range.c: New test.\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c96b2f3999c2f8a24ad6634804ebc6214ba99ae6",
      "new_mode": 33188,
      "new_path": "gcc/testsuite/gcc.target/aarch64/sve2/niter-convert-range.c"
    },
    {
      "type": "modify",
      "old_id": "13dd1e30fbbbd79c98b3cbc26edc931fe3fec045",
      "old_mode": 33188,
      "old_path": "gcc/tree-ssa-loop-niter.cc",
      "new_id": "0c1ebd1c7d5191d0e10ccb60c53cde13d2da8d4d",
      "new_mode": 33188,
      "new_path": "gcc/tree-ssa-loop-niter.cc"
    }
  ]
}
