[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / CodeGen / X86 / fp-elim.ll
blob65764d144a2ca0da21613660dd32aeb118323ca2
1 ; RUN: llc < %s -mtriple=i686-- -asm-verbose=false                           | FileCheck %s -check-prefix=FP-ELIM
2 ; RUN: llc < %s -mtriple=i686-- -asm-verbose=false -frame-pointer=all          | FileCheck %s -check-prefix=NO-ELIM
4 ; Implement -momit-leaf-frame-pointer
5 ; rdar://7886181
7 define i32 @t1() nounwind readnone {
8 entry:
9 ; FP-ELIM-LABEL:  t1:
10 ; FP-ELIM-NEXT:     movl
11 ; FP-ELIM-NEXT:     ret
13 ; NO-ELIM-LABEL:  t1:
14 ; NO-ELIM-NEXT:     pushl %ebp
15 ; NO-ELIM:          popl %ebp
16 ; NO-ELIM-NEXT:     ret
17   ret i32 10
20 define void @t2() nounwind {
21 entry:
22 ; FP-ELIM-LABEL:  t2:
23 ; FP-ELIM-NOT:      pushl %ebp
24 ; FP-ELIM:          ret
26 ; NO-ELIM-LABEL:  t2:
27 ; NO-ELIM-NEXT:     pushl %ebp
28 ; NO-ELIM:          popl %ebp
29 ; NO-ELIM-NEXT:     ret
30   tail call void @foo(i32 0) nounwind
31   ret void
34 define i32 @t3() "no-frame-pointer-elim-non-leaf" nounwind readnone {
35 entry:
36 ; FP-ELIM-LABEL:  t3:
37 ; FP-ELIM-NEXT:     movl
38 ; FP-ELIM-NEXT:     ret
40 ; NO-ELIM-LABEL:  t3:
41 ; NO-ELIM-NEXT:     pushl %ebp
42 ; NO-ELIM:          popl %ebp
43 ; NO-ELIM-NEXT:     ret
44   ret i32 10
47 define void @t4() "no-frame-pointer-elim-non-leaf" nounwind {
48 entry:
49 ; FP-ELIM-LABEL:  t4:
50 ; FP-ELIM-NEXT:     pushl %ebp
51 ; FP-ELIM:          popl %ebp
52 ; FP-ELIM-NEXT:     ret
54 ; NO-ELIM-LABEL:  t4:
55 ; NO-ELIM-NEXT:     pushl %ebp
56 ; NO-ELIM:          popl %ebp
57 ; NO-ELIM-NEXT:     ret
58   tail call void @foo(i32 0) nounwind
59   ret void
62 declare void @foo(i32)