1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/CodeGen/Mips/frame-address-err.ll
Simon Atanasyan 59eb4a19ba [mips] Replace assertion by error message while lowering RETURNADDR and FRAMEADDR
MIPS target supports lowering `RETURNADDR` and `FRAMEADDR` for a current
frame only. It's better to show an error message then crash on assertion
if `__builtin_return_address` is invoked with non-zero argument.

llvm-svn: 355558
2019-03-06 22:40:28 +00:00

12 lines
272 B
LLVM

; RUN: not llc -march=mips < %s 2>&1 | FileCheck %s
declare i8* @llvm.frameaddress(i32) nounwind readnone
define i8* @f() nounwind {
entry:
%0 = call i8* @llvm.frameaddress(i32 1)
ret i8* %0
; CHECK: error: return address can be determined only for current frame
}