[Mlir-commits] [mlir] [vector][distribution] Bug fix in `moveRegionToNewWarpOpAndAppendReturns` (PR #153656)
Charitha Saumya
llvmlistbot at llvm.org
Fri Aug 15 08:48:27 PDT 2025
charithaintc wrote:
> What happens when there are users of all three `%r:3` results? Is it tracked correctly?
yes. Other results gets folded away by `WarpOpDeadResult` pattern.
>
> Btw, this example still crashes:
>
> ```mlir
> func.func @warp_propagate_duplicated_operands_in_yield(%laneid: index) {
> %r:3 = gpu.warp_execute_on_lane_0(%laneid)[32] -> (vector<1xf32>, vector<1xf32>, vector<1xf32>) {
> %0 = "some_def"() : () -> (vector<32xf32>)
> %1 = "some_other_def"() : () -> (vector<32xf32>)
> %2 = math.exp %1 : vector<32xf32>
> gpu.yield %2, %0, %0 : vector<32xf32>, vector<32xf32>, vector<32xf32>
> }
> "some_use"(%r#2) : (vector<1xf32>) -> () // Note user of the duplicate only
> return
> }
> ```
Good catch. There is another issue in `WarpOpDeadResult`. I think this is the reason for that. I have a fix in another PR. But did not merge it yet because this issue not bothering us at this point. But you are right, we need to take care of it too at some point.
https://github.com/llvm/llvm-project/pull/148067
In any case, I think this issue is clearly isolated. The fact that yielded values using a SetVector and types using SmallVector is clearly not correct in the presence of duplicated yielded values.
https://github.com/llvm/llvm-project/pull/153656
More information about the Mlir-commits
mailing list