101 lines · c
1// RUN: %clang --target=i386-pc-linux -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s2// RUN: %clang --target=i386-pc-linux -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s3// RUN: %clang --target=i386-pc-linux -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s4// RUN: %clang --target=i386-pc-linux -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s5// RUN: %clang --target=i386-pc-linux -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s6 7// RUN: %clang --target=i386-linux-android -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s8// RUN: %clang --target=i386-linux-android -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s9// RUN: %clang --target=i386-linux-android -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s10 11// RUN: %clang --target=x86_64-pc-linux -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s12// RUN: %clang --target=x86_64-pc-linux -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s13// RUN: %clang --target=x86_64-pc-linux -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s14// RUN: %clang --target=x86_64-pc-linux -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s15// RUN: %clang --target=x86_64-pc-linux -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s16// RUN: %clang --target=x86_64-pc-win32-macho -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-MACHO-64 %s17 18// RUN: %clang --target=x86_64-linux-android -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s19// RUN: %clang --target=x86_64-linux-android -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s20// RUN: %clang --target=x86_64-linux-android -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s21 22// Trust the above to get the optimizations right, and just test other targets23// that want this by default.24// RUN: %clang --target=s390x-pc-linux -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s25// RUN: %clang --target=s390x-pc-linux -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s26 27// RUN: %clang --target=powerpc-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s28// RUN: %clang --target=powerpc-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s29// RUN: %clang --target=powerpc64-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s30// RUN: %clang --target=powerpc64-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s31// RUN: %clang --target=powerpc64le-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s32// RUN: %clang --target=powerpc64le-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s33 34// RUN: %clang --target=mips-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s35// RUN: %clang --target=mips-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s36// RUN: %clang --target=mipsel-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s37// RUN: %clang --target=mipsel-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s38// RUN: %clang --target=mips64-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s39// RUN: %clang --target=mips64-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s40// RUN: %clang --target=mips64el-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s41// RUN: %clang --target=mips64el-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s42 43// RUN: %clang --target=riscv32-unknown-elf -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s44// RUN: %clang --target=riscv32-unknown-elf -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s45// RUN: %clang --target=riscv32-unknown-elf -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s46// RUN: %clang --target=riscv32-unknown-elf -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s47// RUN: %clang --target=riscv32-unknown-elf -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s48 49// RUN: %clang --target=riscv64-unknown-elf -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s50// RUN: %clang --target=riscv64-unknown-elf -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s51// RUN: %clang --target=riscv64-unknown-elf -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s52// RUN: %clang --target=riscv64-unknown-elf -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s53// RUN: %clang --target=riscv64-unknown-elf -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s54 55// RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s56// RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s57// RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s58// RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s59// RUN: %clang --target=riscv32-unknown-linux-gnu -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s60 61// RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s62// RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s63// RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s64// RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s65// RUN: %clang --target=riscv64-unknown-linux-gnu -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s66 67// RUN: %clang --target=riscv64-linux-android -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s68// RUN: %clang --target=riscv64-linux-android -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s69// RUN: %clang --target=riscv64-linux-android -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-ANDROID %s70 71// RUN: %clang --target=loongarch32 -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-32 %s72// RUN: %clang --target=loongarch32 -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-32 %s73// RUN: %clang --target=loongarch32 -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-32 %s74// RUN: %clang --target=loongarch32 -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-32 %s75// RUN: %clang --target=loongarch32 -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-32 %s76 77// RUN: %clang --target=loongarch64 -### -S -O0 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK0-64 %s78// RUN: %clang --target=loongarch64 -### -S -O1 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK1-64 %s79// RUN: %clang --target=loongarch64 -### -S -O2 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK2-64 %s80// RUN: %clang --target=loongarch64 -### -S -O3 %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK3-64 %s81// RUN: %clang --target=loongarch64 -### -S -Os %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECKs-64 %s82 83// RUN: %clang --target=armv7-apple-macho -### -S %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-MACHO-32 %s84 85// CHECK0-32: -mframe-pointer=all86// CHECK1-32-NOT: -mframe-pointer=all87// CHECK2-32-NOT: -mframe-pointer=all88// CHECK3-32-NOT: -mframe-pointer=all89// CHECKs-32-NOT: -mframe-pointer=all90 91// CHECK-MACHO-32: -mframe-pointer=non-leaf92 93// CHECK0-64: -mframe-pointer=all94// CHECK1-64-NOT: -mframe-pointer=all95// CHECK2-64-NOT: -mframe-pointer=all96// CHECK3-64-NOT: -mframe-pointer=all97// CHECKs-64-NOT: -mframe-pointer=all98// CHECK-MACHO-64: -mframe-pointer=all99 100// CHECK-ANDROID: -mframe-pointer=non-leaf101