Skip to content

Commit ece9d37

Browse files
Use result builder utility
1 parent 02fe9fb commit ece9d37

File tree

1 file changed

+2
-2
lines changed
  • mlir/python/mlir/dialects

1 file changed

+2
-2
lines changed

mlir/python/mlir/dialects/scf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from ._ods_common import (
1414
get_op_result_or_value as _get_op_result_or_value,
1515
get_op_results_or_values as _get_op_results_or_values,
16+
get_op_result_or_op_results as _get_op_result_or_op_results,
1617
_cext as _ods_cext,
1718
)
1819
except ImportError as e:
@@ -325,5 +326,4 @@ def index_switch(
325326
loc=loc,
326327
ip=ip,
327328
)
328-
results = op.results
329-
return results if len(results) > 1 else (results[0] if len(results) == 1 else op)
329+
return _get_op_result_or_op_results(op)

0 commit comments

Comments
 (0)