2015-01-13 00:48:10 +00:00
|
|
|
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
declare i8* @llvm.frameallocate(i32)
|
2015-01-13 01:51:34 +00:00
|
|
|
declare i8* @llvm.framerecover(i8*, i8*)
|
2015-01-13 00:48:10 +00:00
|
|
|
|
|
|
|
define internal void @f() {
|
|
|
|
call i8* @llvm.frameallocate(i32 4)
|
|
|
|
call i8* @llvm.frameallocate(i32 4)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
; CHECK: multiple calls to llvm.frameallocate in one function
|
|
|
|
|
|
|
|
define internal void @f_a(i32 %n) {
|
|
|
|
call i8* @llvm.frameallocate(i32 %n)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
; CHECK: llvm.frameallocate argument must be constant integer size
|
|
|
|
|
|
|
|
define internal void @g() {
|
|
|
|
entry:
|
|
|
|
br label %not_entry
|
|
|
|
not_entry:
|
|
|
|
call i8* @llvm.frameallocate(i32 4)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
; CHECK: llvm.frameallocate used outside of entry block
|
|
|
|
|
|
|
|
define internal void @h() {
|
2015-01-13 01:51:34 +00:00
|
|
|
call i8* @llvm.framerecover(i8* null, i8* null)
|
2015-01-13 00:48:10 +00:00
|
|
|
ret void
|
|
|
|
}
|
2015-01-13 01:51:34 +00:00
|
|
|
; CHECK: llvm.framerecover first argument must be function defined in this module
|
2015-01-13 00:48:10 +00:00
|
|
|
|
|
|
|
@global = constant i8 0
|
|
|
|
|
|
|
|
declare void @declaration()
|
|
|
|
|
|
|
|
define internal void @i() {
|
2015-01-13 01:51:34 +00:00
|
|
|
call i8* @llvm.framerecover(i8* @global, i8* null)
|
2015-01-13 00:48:10 +00:00
|
|
|
ret void
|
|
|
|
}
|
2015-01-13 01:51:34 +00:00
|
|
|
; CHECK: llvm.framerecover first argument must be function defined in this module
|
2015-01-13 00:48:10 +00:00
|
|
|
|
|
|
|
define internal void @j() {
|
2015-01-13 01:51:34 +00:00
|
|
|
call i8* @llvm.framerecover(i8* bitcast(void()* @declaration to i8*), i8* null)
|
2015-01-13 00:48:10 +00:00
|
|
|
ret void
|
|
|
|
}
|
2015-01-13 01:51:34 +00:00
|
|
|
; CHECK: llvm.framerecover first argument must be function defined in this module
|