llvm-project/llvm/test/Bitcode/sret-only-on-declaration.ll
Nikita Popov 2182665305 [Bitcode] Don't confuse type attributes on declaration and call
We should not be using APIs here that try to fetch the attribute
from both the call attributes and the function attributes. Otherwise
we'll try to upgrade a non-existent sret attribute on the call using
the attribute on the function.
2022-03-11 17:32:40 +01:00

12 lines
269 B
LLVM

; RUN: llvm-as -opaque-pointers < %s | llvm-dis -opaque-pointers | FileCheck %s
; CHECK: declare void @decl(ptr sret(i64))
; CHECK: call void @decl(ptr %arg)
declare void @decl(i64* sret(i64))
define void @test(i64* %arg) {
call void @decl(i64* %arg)
ret void
}