There is a bug in getSemiAffineExprFromFlatForm. The
getAffineExprFromFlatForm method can handle the case, but the other
fails. Switch to working method to unblock developments of downstream
projects.
Minimized test case:
#map2 = affine_map<()[s0] -> (((s0 floordiv 2) * s0) + (s0 mod 2))> module { func.func @dynamic_unpack_simple_dispatch_0(%arg3: index) { %3 = affine.apply #map2()[%arg3] {__d__} vector.print %3 : index return } }
See https://github.com/llvm/llvm-project/issues/58419 for more details.