blob: cec168636c13410cfaec3000196a2e59cf074067 [file] [log] [blame]
Sebastian Pop422377c2012-01-20 22:01:23 +00001// RUN: %clang -target i386-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
2// RUN: %clang -target i386-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
3// RUN: %clang -target i386-pc-linux -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s
4// RUN: %clang -target i386-pc-linux -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s
5// RUN: %clang -target i386-pc-linux -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s
Rafael Espindola224dd632011-12-14 21:02:23 +00006
7
Sebastian Pop422377c2012-01-20 22:01:23 +00008// RUN: %clang -target x86_64-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s
9// RUN: %clang -target x86_64-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s
10// RUN: %clang -target x86_64-pc-linux -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s
11// RUN: %clang -target x86_64-pc-linux -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s
12// RUN: %clang -target x86_64-pc-linux -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s
Akira Hatanaka8f5866a2016-02-26 05:07:00 +000013// RUN: %clang -target x86_64-pc-win32-macho -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-MACHO-64 %s
Rafael Espindola224dd632011-12-14 21:02:23 +000014
Richard Sandiford896f8db2013-07-19 14:06:49 +000015// Trust the above to get the optimizations right, and just test other targets
16// that want this by default.
17// RUN: %clang -target s390x-pc-linux -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s
18// RUN: %clang -target s390x-pc-linux -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s
19
Akira Hatanaka3764e6c2013-10-16 17:13:08 +000020// RUN: %clang -target mips-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
21// RUN: %clang -target mips-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
22// RUN: %clang -target mipsel-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
23// RUN: %clang -target mipsel-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
24// RUN: %clang -target mips64-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
25// RUN: %clang -target mips64-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
26// RUN: %clang -target mips64el-linux-gnu -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s
27// RUN: %clang -target mips64el-linux-gnu -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s
28
Rafael Espindola224dd632011-12-14 21:02:23 +000029// CHECK0-32: -mdisable-fp-elim
30// CHECK1-32-NOT: -mdisable-fp-elim
31// CHECK2-32-NOT: -mdisable-fp-elim
32// CHECK3-32-NOT: -mdisable-fp-elim
33// CHECKs-32-NOT: -mdisable-fp-elim
34
35// CHECK0-64: -mdisable-fp-elim
36// CHECK1-64-NOT: -mdisable-fp-elim
37// CHECK2-64-NOT: -mdisable-fp-elim
38// CHECK3-64-NOT: -mdisable-fp-elim
39// CHECKs-64-NOT: -mdisable-fp-elim
Akira Hatanaka8f5866a2016-02-26 05:07:00 +000040// CHECK-MACHO-64: -mdisable-fp-elim