[llvm] [Coroutines] fix coroutines + std::unique_ptr with async exceptions validation errors (PR #149691)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 03:39:48 PDT 2025
tzuralon wrote:
The fix is done right before the conversion, so no logics was changed in the conversion itself.
Reduced IR example:
- In this example - https://llvm.godbolt.org/z/Gj3baj77W you can see that the IR (used in the test pr148035_inst_does_not_dominate.ll) resulted in validation error, the upper pane with --disable-verify succeeded, and the bottom one with validations fails with the dominance violation)
- In this example - https://llvm.godbolt.org/z/ssGbPdY8d you can see both have passed.
- My proposed fix transforms the initial IR (first bullet left pane) into the dominance fixed IR (second bullet left pane)
- I added some coroutine intrinsics declarations to help it pass, but the node changes within the function are in focus.
> I had a impression that this patch tries to fix problematic patterns after the conversion. This is generally unwanted. We prefer to make the checks before the conversion. e.g., in certain cases, let's avoid adding something as the spills or vice versa.
>
> It will be helpful to me to understand the problem if you can give more description to the issue with IR examples.
https://github.com/llvm/llvm-project/pull/149691
More information about the llvm-commits
mailing list