In a nested loop nest, it is not feasible to map different loops to the same processing unit; for an example, check the code below. This modification includes a check in this circumstance.
scf.foreach_thread (%i, %j) in (%c32, %c32) {...} { mapping = [#gpu.thread<x>, #gpu.thread<x>] }
Note: It also deletes a test because it is not possible to reproduce this error.
Depends on D138020
Nit: ArrayRef is already an implicitly constant reference to an array, no need to pass it by const reference additionally.