Skip to content

Commit 46bff78

Browse files
committed
[Coroutines] Remove alignment check in shouldBeMustTail
Differential Revision: https://reviews.llvm.org/D77362
1 parent 3f13ee8 commit 46bff78

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/Transforms/Coroutines/CoroSplit.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,9 @@ static bool shouldBeMustTail(const CallInst &CI, const Function &F) {
10151015

10161016
// CI should not has any ABI-impacting function attributes.
10171017
static const Attribute::AttrKind ABIAttrs[] = {
1018-
Attribute::StructRet, Attribute::ByVal, Attribute::InAlloca,
1019-
Attribute::InReg, Attribute::Returned, Attribute::SwiftSelf,
1020-
Attribute::SwiftError, Attribute::Alignment};
1018+
Attribute::StructRet, Attribute::ByVal, Attribute::InAlloca,
1019+
Attribute::InReg, Attribute::Returned, Attribute::SwiftSelf,
1020+
Attribute::SwiftError};
10211021
AttributeList Attrs = CI.getAttributes();
10221022
for (auto AK : ABIAttrs)
10231023
if (Attrs.hasParamAttribute(0, AK))

llvm/test/Transforms/Coroutines/coro-split-musttail2.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ entry:
88
ret void;
99
}
1010

11-
define void @fakeresume2(i64*) {
11+
define void @fakeresume2(i64* align 8) {
1212
entry:
1313
ret void;
1414
}
@@ -29,7 +29,7 @@ entry:
2929
]
3030
await.ready:
3131
%save2 = call token @llvm.coro.save(i8* null)
32-
call fastcc void @fakeresume2(i64* null)
32+
call fastcc void @fakeresume2(i64* align 8 null)
3333

3434
%suspend2 = call i8 @llvm.coro.suspend(token %save2, i1 false)
3535
switch i8 %suspend2, label %exit [
@@ -47,7 +47,7 @@ exit:
4747

4848
; Verify that in the resume part resume call is marked with musttail.
4949
; CHECK-LABEL: @g.resume(
50-
; CHECK: musttail call fastcc void @fakeresume2(i64* null)
50+
; CHECK: musttail call fastcc void @fakeresume2(i64* align 8 null)
5151
; CHECK-NEXT: ret void
5252

5353
declare token @llvm.coro.id(i32, i8* readnone, i8* nocapture readonly, i8*) #1

0 commit comments

Comments
 (0)