)]}'
{
  "commit": "a1b922ff46551fedae1c171e9ac3918f50005d31",
  "tree": "80d95cc7c388d4ade37d6fd6df817377b0cad266",
  "parents": [
    "473699f57f9b817c35e400c6d1f1f98c47767c22"
  ],
  "author": {
    "name": "Federico Bruzzone",
    "email": "federico.bruzzone.i@gmail.com",
    "time": "Fri Aug 28 10:43:45 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Aug 28 10:43:45 2026 +0200"
  },
  "message": "[GlobalOpt][Flow][Quant] Fix segfault on unlowered `quant.uniform` types (#24824)\n\n`HoistIntoGlobalsPass`\u0027s `HoistableTensorTypeInterface` unconditionally\ncalled `getIntOrFloatBitWidth()` on a tensor\u0027s element type to decide\nwhether it is hoistable, assuming it is always a plain int/float. A\n`!quant.uniform\u003c...\u003e` element type is neither, so\n`getIntOrFloatBitWidth()` crashes instead of returning a sane answer.\n\n`isHoistableType`/`isHoistableLeafType`, with this PR, check that the\nelement type is actually an int/float\nbefore computing its bit width via a new helper `hasComputableBitWidth`,\nand conservatively treat anything else as\nnon-hoistable.\n\nAdditonally, `quant.uniform` types leak into the pipeline because\n`quant` is a transitive type dependency of TOSA, not because we have any\nlowering support for `quant.qcast`/`quant.dcast`/`quant.scast` AFAIK.\nTOSA\u0027s own conversion to `linalg`/`arith` is expected to fully resolve\nthese before `Flow`. `VerifyInputLegalityPass` already enforces that for\nthose some dialects, `quant` was simply missing from the list, so IR\nwhere these ops survive past `GlobalOptimization` would segfault later.\n\nFixes #24814\n\n---------\n\nSigned-off-by: Federico Bruzzone \u003cfederico.bruzzone.i@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2614f987125d1f5b5d39b180b5963d457d72e6ad",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/VerifyInputLegality.cpp",
      "new_id": "7621b85a8629454717ab9a313d911cf987bdc6e9",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/VerifyInputLegality.cpp"
    },
    {
      "type": "modify",
      "old_id": "f746eab81178e87c35b589d3f8f4d483e8264f2f",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/test/verify_input_ir.mlir",
      "new_id": "eac96d898078b57b1158f884fbecc1c5bb8afe04",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/Flow/Transforms/test/verify_input_ir.mlir"
    },
    {
      "type": "modify",
      "old_id": "2fd972ee836b39a62d1d227fc2cdd1db44215197",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/Dialect/Util/Transforms/test/hoist_into_globals.mlir",
      "new_id": "b569d44b57b549d4b58f4fd4c7c5c88f6d732d28",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/Dialect/Util/Transforms/test/hoist_into_globals.mlir"
    },
    {
      "type": "modify",
      "old_id": "1c539923ccb9e430126a19ffac4d81f0d5c089f7",
      "old_mode": 33188,
      "old_path": "compiler/src/iree/compiler/GlobalOptimization/Interfaces/HoistableTypeInterface.cpp",
      "new_id": "4253948cb083241c77c483c6f2d5d0b31c546b54",
      "new_mode": 33188,
      "new_path": "compiler/src/iree/compiler/GlobalOptimization/Interfaces/HoistableTypeInterface.cpp"
    }
  ]
}
