This is a Work In Progress.
The patch define the OpenMP Canonical Operation for OpenMP MLIR Dialect
Depends on what is the value that is returned. What value are you expecting to return here?
Try to reuse the same loop control unless you need a different one.
You might also want to discuss whether the loop should unit step forward counting as in the OpenMP IRBuilder or general like in the current LoopControl.
Personally, I would only make it take the trip count N with normalized %iv = 0...N-1 and let the Frontend handle all language semantics (is ub inclusive?, negative step, integer overflow, non-integer iteration variables, ...). It also simplifies mid-end passes since they only have to handle this normalized form.
However, for omp.wsloop the Fortran people had strong opinion that we should represent lb/ub/step explicitly. IMHO it only makes the MLIR representation more complex. Apart from edge cases (lb=INT_MIN, ub=INT_MAX) it more expressive than the normalized way, so I am willing to compromise.