diff options
author | Gor Nishanov <GorNishanov@gmail.com> | 2016-09-30 19:24:19 +0000 |
---|---|---|
committer | Gor Nishanov <GorNishanov@gmail.com> | 2016-09-30 19:24:19 +0000 |
commit | a263a60ad5c6b299c23c86c440c69a3ff98bbcd5 (patch) | |
tree | f434234b39f2d6dcfb683b797699f9af7149fdba /llvm/lib/Support/PrettyStackTrace.cpp | |
parent | 75b25187627bbf78453f2cefb24fa28a07ceb289 (diff) | |
download | llvm-a263a60ad5c6b299c23c86c440c69a3ff98bbcd5.zip llvm-a263a60ad5c6b299c23c86c440c69a3ff98bbcd5.tar.gz llvm-a263a60ad5c6b299c23c86c440c69a3ff98bbcd5.tar.bz2 |
[Coroutines] Part15c: Fix coro-split to correctly handle definitions between coro.save and coro.suspend
Summary:
In the case below, %Result.i19 is defined between coro.save and coro.suspend and used after coro.suspend. We need to correctly place such a value into the coroutine frame.
```
%save = call token @llvm.coro.save(i8* null)
%Result.i19 = getelementptr inbounds %"struct.lean_future<int>::Awaiter", %"struct.lean_future<int>::Awaiter"* %ref.tmp7, i64 0, i32 0
%suspend = call i8 @llvm.coro.suspend(token %save, i1 false)
switch i8 %suspend, label %exit [
i8 0, label %await.ready
i8 1, label %exit
]
await.ready:
%val = load i32, i32* %Result.i19
```
Reviewers: majnemer
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D24418
llvm-svn: 282902
Diffstat (limited to 'llvm/lib/Support/PrettyStackTrace.cpp')
0 files changed, 0 insertions, 0 deletions