Closed Kuree closed 1 month ago
Based on the documentation on folder, it says:
/// Note that this mechanism cannot be used to remove 0-result operations.
LogicalResult MyOp::fold(FoldAdaptor adaptor,
SmallVectorImpl<OpFoldResult> &results) {
...
}
It seems like we are not allowed to fold if the scf.index_switch
op has no results. I can send a PR to fix this.
Edit: found a much smaller input.
Input:
See godbolt link that uses trunk: https://godbolt.org/z/1fcT87E17