[PATCH] D142385: CoroFrame: Fix missing bitcast for some frame merges

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 10:25:57 PST 2023


MatzeB created this revision.
MatzeB added a reviewer: ChuanqiXu.
Herald added subscribers: modimo, wenlei, hiraditya, mcrosier.
Herald added a project: All.
MatzeB requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The code to adjust types when merging fields on the coroutine frame accidentally used `GetElementPtrInst::getResultElementType()` which does the return the type the resulting pointer points to (so misses a pointer type). This worked most of the time by accident because the type nearly never matched, but failed to add a necessary bitcast for from `i8**` to `i8*`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142385

Files:
  llvm/lib/Transforms/Coroutines/CoroFrame.cpp
  llvm/test/Transforms/Coroutines/coro-frame-reuse-type-fix.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142385.491436.patch
Type: text/x-patch
Size: 3766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230123/fa54798f/attachment.bin>


More information about the llvm-commits mailing list