1 // RUN: %clang --target=i386-pc-linux -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 2 // RUN: %clang --target=i386-pc-linux -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 3 // RUN: %clang --target=i386-pc-linux -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s 4 // RUN: %clang --target=i386-pc-linux -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s 5 // RUN: %clang --target=i386-pc-linux -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s 6 7 // RUN: %clang --target=i386-linux-android -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 8 // RUN: %clang --target=i386-linux-android -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 9 // RUN: %clang --target=i386-linux-android -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 10 11 // RUN: %clang --target=x86_64-pc-linux -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 12 // RUN: %clang --target=x86_64-pc-linux -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 13 // RUN: %clang --target=x86_64-pc-linux -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s 14 // RUN: %clang --target=x86_64-pc-linux -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s 15 // RUN: %clang --target=x86_64-pc-linux -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s 16 // RUN: %clang --target=x86_64-pc-win32-macho -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-MACHO-64 %s 17 18 // RUN: %clang --target=x86_64-linux-android -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 19 // RUN: %clang --target=x86_64-linux-android -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 20 // RUN: %clang --target=x86_64-linux-android -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 21 22 // Trust the above to get the optimizations right, and just test other targets 23 // that want this by default. 24 // RUN: %clang --target=s390x-pc-linux -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 25 // RUN: %clang --target=s390x-pc-linux -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 26 27 // RUN: %clang --target=powerpc-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 28 // RUN: %clang --target=powerpc-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 29 // RUN: %clang --target=powerpc64-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 30 // RUN: %clang --target=powerpc64-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 31 // RUN: %clang --target=powerpc64le-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 32 // RUN: %clang --target=powerpc64le-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 33 34 // RUN: %clang --target=mips-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 35 // RUN: %clang --target=mips-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 36 // RUN: %clang --target=mipsel-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 37 // RUN: %clang --target=mipsel-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 38 // RUN: %clang --target=mips64-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 39 // RUN: %clang --target=mips64-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 40 // RUN: %clang --target=mips64el-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 41 // RUN: %clang --target=mips64el-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 42 43 // RUN: %clang --target=riscv32-unknown-elf -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 44 // RUN: %clang --target=riscv32-unknown-elf -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 45 // RUN: %clang --target=riscv32-unknown-elf -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s 46 // RUN: %clang --target=riscv32-unknown-elf -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s 47 // RUN: %clang --target=riscv32-unknown-elf -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s 48 49 // RUN: %clang --target=riscv64-unknown-elf -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 50 // RUN: %clang --target=riscv64-unknown-elf -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 51 // RUN: %clang --target=riscv64-unknown-elf -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s 52 // RUN: %clang --target=riscv64-unknown-elf -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s 53 // RUN: %clang --target=riscv64-unknown-elf -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s 54 55 // RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 56 // RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 57 // RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s 58 // RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s 59 // RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s 60 61 // RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 62 // RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 63 // RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s 64 // RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s 65 // RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s 66 67 // RUN: %clang --target=riscv64-linux-android -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 68 // RUN: %clang --target=riscv64-linux-android -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 69 // RUN: %clang --target=riscv64-linux-android -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s 70 71 // RUN: %clang --target=loongarch32 -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s 72 // RUN: %clang --target=loongarch32 -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s 73 // RUN: %clang --target=loongarch32 -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s 74 // RUN: %clang --target=loongarch32 -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s 75 // RUN: %clang --target=loongarch32 -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s 76 77 // RUN: %clang --target=loongarch64 -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s 78 // RUN: %clang --target=loongarch64 -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s 79 // RUN: %clang --target=loongarch64 -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s 80 // RUN: %clang --target=loongarch64 -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s 81 // RUN: %clang --target=loongarch64 -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s 82 83 // CHECK0-32: -mframe-pointer=all 84 // CHECK1-32-NOT: -mframe-pointer=all 85 // CHECK2-32-NOT: -mframe-pointer=all 86 // CHECK3-32-NOT: -mframe-pointer=all 87 // CHECKs-32-NOT: -mframe-pointer=all 88 89 // CHECK0-64: -mframe-pointer=all 90 // CHECK1-64-NOT: -mframe-pointer=all 91 // CHECK2-64-NOT: -mframe-pointer=all 92 // CHECK3-64-NOT: -mframe-pointer=all 93 // CHECKs-64-NOT: -mframe-pointer=all 94 // CHECK-MACHO-64: -mframe-pointer=all 95 96 // CHECK-ANDROID: -mframe-pointer=non-leaf 97