xref: /minix3/external/bsd/llvm/dist/llvm/test/CodeGen/X86/leaf-fp-elim.ll (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc; RUN: llc < %s -relocation-model=pic -mtriple=x86_64-apple-darwin | FileCheck %s
2*f4a2713aSLionel Sambuc; <rdar://problem/8170192>
3*f4a2713aSLionel Sambuctarget datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
4*f4a2713aSLionel Sambuctarget triple = "x86_64-apple-darwin11.0"
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuc@msg = internal global i8* null                   ; <i8**> [#uses=1]
7*f4a2713aSLionel Sambuc@.str = private constant [2 x i8] c"x\00", align 1 ; <[2 x i8]*> [#uses=1]
8*f4a2713aSLionel Sambuc
9*f4a2713aSLionel Sambucdefine void @test(i8* %p) "no-frame-pointer-elim-non-leaf" nounwind optsize ssp {
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc; No stack frame, please.
12*f4a2713aSLionel Sambuc; CHECK:     _test
13*f4a2713aSLionel Sambuc; CHECK-NOT: pushq %rbp
14*f4a2713aSLionel Sambuc; CHECK-NOT: movq %rsp, %rbp
15*f4a2713aSLionel Sambuc; CHECK:     InlineAsm Start
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambucentry:
18*f4a2713aSLionel Sambuc  %0 = icmp eq i8* %p, null                       ; <i1> [#uses=1]
19*f4a2713aSLionel Sambuc  br i1 %0, label %return, label %bb
20*f4a2713aSLionel Sambuc
21*f4a2713aSLionel Sambucbb:                                               ; preds = %entry
22*f4a2713aSLionel Sambuc  tail call void asm "mov $1, $0", "=*m,{cx},~{dirflag},~{fpsr},~{flags}"(i8** @msg, i8* getelementptr inbounds ([2 x i8]* @.str, i64 0, i64 0)) nounwind
23*f4a2713aSLionel Sambuc  tail call void @llvm.trap()
24*f4a2713aSLionel Sambuc  unreachable
25*f4a2713aSLionel Sambuc
26*f4a2713aSLionel Sambucreturn:                                           ; preds = %entry
27*f4a2713aSLionel Sambuc  ret void
28*f4a2713aSLionel Sambuc}
29*f4a2713aSLionel Sambuc
30*f4a2713aSLionel Sambucdeclare void @llvm.trap() nounwind
31