[Concurrency] Correct memory effect attributes of task_create

Without this, llvm would sometimes wrongly assume there's no indirect
accesses and the optimizations can lead to a runtime crash, by
optimizing away initializing options properly.

Resolves rdar://152548190
This commit is contained in:
Konrad 'ktoso' Malawski
2025-06-11 21:48:07 +09:00
parent 1484f1c5be
commit 3aa28b4de9
3 changed files with 31 additions and 25 deletions

View File

@@ -2376,7 +2376,7 @@ FUNCTION(TaskCreate,
RefCountedPtrTy),
ATTRS(NoUnwind),
EFFECT(RuntimeEffect::Concurrency),
MEMEFFECTS(ArgMemOnly))
MEMEFFECTS(ReadOnly))
// void swift_task_switch(AsyncContext *resumeContext,
// TaskContinuationFunction *resumeFunction,