xref: /aosp_15_r20/external/clang/test/Driver/frame-pointer.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang -target i386-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
2*67e74705SXin Li // RUN: %clang -target i386-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
3*67e74705SXin Li // RUN: %clang -target i386-pc-linux -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s
4*67e74705SXin Li // RUN: %clang -target i386-pc-linux -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s
5*67e74705SXin Li // RUN: %clang -target i386-pc-linux -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s
6*67e74705SXin Li 
7*67e74705SXin Li 
8*67e74705SXin Li // RUN: %clang -target x86_64-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s
9*67e74705SXin Li // RUN: %clang -target x86_64-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s
10*67e74705SXin Li // RUN: %clang -target x86_64-pc-linux -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s
11*67e74705SXin Li // RUN: %clang -target x86_64-pc-linux -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s
12*67e74705SXin Li // RUN: %clang -target x86_64-pc-linux -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s
13*67e74705SXin Li // RUN: %clang -target x86_64-pc-win32-macho -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-MACHO-64 %s
14*67e74705SXin Li 
15*67e74705SXin Li // Trust the above to get the optimizations right, and just test other targets
16*67e74705SXin Li // that want this by default.
17*67e74705SXin Li // RUN: %clang -target s390x-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s
18*67e74705SXin Li // RUN: %clang -target s390x-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s
19*67e74705SXin Li 
20*67e74705SXin Li // RUN: %clang -target mips-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
21*67e74705SXin Li // RUN: %clang -target mips-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
22*67e74705SXin Li // RUN: %clang -target mipsel-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
23*67e74705SXin Li // RUN: %clang -target mipsel-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
24*67e74705SXin Li // RUN: %clang -target mips64-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
25*67e74705SXin Li // RUN: %clang -target mips64-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
26*67e74705SXin Li // RUN: %clang -target mips64el-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
27*67e74705SXin Li // RUN: %clang -target mips64el-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
28*67e74705SXin Li 
29*67e74705SXin Li // CHECK0-32: -mdisable-fp-elim
30*67e74705SXin Li // CHECK1-32-NOT: -mdisable-fp-elim
31*67e74705SXin Li // CHECK2-32-NOT: -mdisable-fp-elim
32*67e74705SXin Li // CHECK3-32-NOT: -mdisable-fp-elim
33*67e74705SXin Li // CHECKs-32-NOT: -mdisable-fp-elim
34*67e74705SXin Li 
35*67e74705SXin Li // CHECK0-64: -mdisable-fp-elim
36*67e74705SXin Li // CHECK1-64-NOT: -mdisable-fp-elim
37*67e74705SXin Li // CHECK2-64-NOT: -mdisable-fp-elim
38*67e74705SXin Li // CHECK3-64-NOT: -mdisable-fp-elim
39*67e74705SXin Li // CHECKs-64-NOT: -mdisable-fp-elim
40*67e74705SXin Li // CHECK-MACHO-64: -mdisable-fp-elim
41