[all-commits] [llvm/llvm-project] 5700f6: [CoroSplit] Don't go sub-word for suspend index (#...

Vlad Sytchenko via All-commits all-commits at lists.llvm.org
Tue Sep 8 00:33:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5700f6fefdc532bb6fa6e30f780a5a553253722e
      https://github.com/llvm/llvm-project/commit/5700f6fefdc532bb6fa6e30f780a5a553253722e
  Author: Vlad Sytchenko <vsytch at hotmail.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M clang/test/CodeGenCoroutines/coro-destructor-of-final_suspend.cpp
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/test/Transforms/Coroutines/ArgAddr.ll
    M llvm/test/Transforms/Coroutines/coro-align16.ll
    M llvm/test/Transforms/Coroutines/coro-align32.ll
    M llvm/test/Transforms/Coroutines/coro-align64-02.ll
    M llvm/test/Transforms/Coroutines/coro-align64.ll
    M llvm/test/Transforms/Coroutines/coro-align8-02.ll
    M llvm/test/Transforms/Coroutines/coro-align8.ll
    M llvm/test/Transforms/Coroutines/coro-alloca-01.ll
    M llvm/test/Transforms/Coroutines/coro-alloca-02.ll
    M llvm/test/Transforms/Coroutines/coro-alloca-03.ll
    M llvm/test/Transforms/Coroutines/coro-alloca-04.ll
    M llvm/test/Transforms/Coroutines/coro-alloca-06.ll
    M llvm/test/Transforms/Coroutines/coro-alloca-08.ll
    M llvm/test/Transforms/Coroutines/coro-byval-param.ll
    M llvm/test/Transforms/Coroutines/coro-catchswitch.ll
    M llvm/test/Transforms/Coroutines/coro-eh-aware-edge-split-01.ll
    M llvm/test/Transforms/Coroutines/coro-eh-aware-edge-split-02.ll
    M llvm/test/Transforms/Coroutines/coro-frame-arrayalloca.ll
    M llvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-01.ll
    M llvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-02.ll
    M llvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-04.ll
    M llvm/test/Transforms/Coroutines/coro-frame-reuse-alloca-05.ll
    M llvm/test/Transforms/Coroutines/coro-param-copy.ll
    M llvm/test/Transforms/Coroutines/coro-spill-defs-before-corobegin.ll
    A llvm/test/Transforms/Coroutines/coro-split-index-datalayout.ll
    M llvm/test/Transforms/Coroutines/coro-split-sink-lifetime-01.ll
    M llvm/test/Transforms/Coroutines/coro-split-sink-lifetime-02.ll
    M llvm/test/Transforms/Coroutines/coro-split-sink-lifetime-03.ll
    M llvm/test/Transforms/Coroutines/coro-split-sink-lifetime-04.ll
    M llvm/test/Transforms/Coroutines/coro-split-tbaa-md.ll

  Log Message:
  -----------
  [CoroSplit] Don't go sub-word for suspend index (#221374)

Currently, `CoroFrame` selects the coroutine suspend index type
(`SwitchIndexType`) using `Type::getIntNTy(Context, IndexBits)`. For
coroutines with fewer than 256 suspend points, this produces
sub-byte/sub-word integer types (such as `i1`, `i2`, or `i8`) in the
coroutine frame struct.

On targets whose `DataLayout` specifies `-n32` (no legal sub-32-bit
integer types), storing and loading sub-word integer fields in memory
forces the backend to emit read-modify-write sequences on every
coroutine suspend and zero-extension masks on every resume.

Use `DataLayout::getSmallestLegalIntType(Context, IndexBits)` when
selecting `SwitchIndexType` so that targets respect their legal native
integer width.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list