| 1 |
// RUN: %clang --target=riscv32-unknown-elf %s -S -emit-llvm -o - \ |
| 2 |
// RUN: | FileCheck %s -check-prefix=RV32-DEFAULT |
| 3 |
// RUN: %clang --target=riscv32-unknown-elf %s -S -emit-llvm -G4 -o - \ |
| 4 |
// RUN: | FileCheck %s -check-prefix=RV32-G4 |
| 5 |
// RUN: %clang --target=riscv32-unknown-elf %s -S -emit-llvm -msmall-data-limit=0 -o - \ |
| 6 |
// RUN: | FileCheck %s -check-prefix=RV32-S0 |
| 7 |
// RUN: %clang --target=riscv32-unknown-elf %s -S -emit-llvm -msmall-data-limit=2 -G4 -o - \ |
| 8 |
// RUN: | FileCheck %s -check-prefix=RV32-S2G4 |
| 9 |
// RUN: %clang --target=riscv32-unknown-elf %s -S -emit-llvm -msmall-data-threshold=16 -o - \ |
| 10 |
// RUN: | FileCheck %s -check-prefix=RV32-T16 |
| 11 |
// RUN: %clang --target=riscv32-unknown-elf %s -S -emit-llvm -fpic -o - \ |
| 12 |
// RUN: | FileCheck %s -check-prefix=RV32-PIC |
| 13 |
|
| 14 |
// RUN: %clang --target=riscv64-unknown-elf %s -S -emit-llvm -o - \ |
| 15 |
// RUN: | FileCheck %s -check-prefix=RV64-DEFAULT |
| 16 |
// RUN: %clang --target=riscv64-unknown-elf %s -S -emit-llvm -G4 -o - \ |
| 17 |
// RUN: | FileCheck %s -check-prefix=RV64-G4 |
| 18 |
// RUN: %clang --target=riscv64-unknown-elf %s -S -emit-llvm -msmall-data-limit=0 -o - \ |
| 19 |
// RUN: | FileCheck %s -check-prefix=RV64-S0 |
| 20 |
// RUN: %clang --target=riscv64-unknown-elf %s -S -emit-llvm -msmall-data-limit=2 -G4 -o - \ |
| 21 |
// RUN: | FileCheck %s -check-prefix=RV64-S2G4 |
| 22 |
// RUN: %clang --target=riscv64-unknown-elf %s -S -emit-llvm -msmall-data-threshold=16 -o - \ |
| 23 |
// RUN: | FileCheck %s -check-prefix=RV64-T16 |
| 24 |
// RUN: %clang --target=riscv64-unknown-elf %s -S -emit-llvm -fpic -o - \ |
| 25 |
// RUN: | FileCheck %s -check-prefix=RV64-PIC |
| 26 |
|
| 27 |
void test(void) {} |
| 28 |
|
| 29 |
// RV32-DEFAULT: !{i32 8, !"SmallDataLimit", i32 0} |
| 30 |
// RV32-G4: !{i32 8, !"SmallDataLimit", i32 4} |
| 31 |
// RV32-S0: !{i32 8, !"SmallDataLimit", i32 0} |
| 32 |
// RV32-S2G4: !{i32 8, !"SmallDataLimit", i32 4} |
| 33 |
// RV32-T16: !{i32 8, !"SmallDataLimit", i32 16} |
| 34 |
// RV32-PIC: !{i32 8, !"SmallDataLimit", i32 0} |
| 35 |
|
| 36 |
// RV64-DEFAULT: !{i32 8, !"SmallDataLimit", i32 0} |
| 37 |
// RV64-G4: !{i32 8, !"SmallDataLimit", i32 4} |
| 38 |
// RV64-S0: !{i32 8, !"SmallDataLimit", i32 0} |
| 39 |
// RV64-S2G4: !{i32 8, !"SmallDataLimit", i32 4} |
| 40 |
// RV64-T16: !{i32 8, !"SmallDataLimit", i32 16} |
| 41 |
// RV64-PIC: !{i32 8, !"SmallDataLimit", i32 0} |
| 42 |
// RV64-LARGE: !{i32 8, !"SmallDataLimit", i32 0} |
| 43 |
|
| 44 |
// The value will be passed by module flag instead of target feature. |
| 45 |
// RV32-S0-NOT: +small-data-limit= |
| 46 |
// RV64-S0-NOT: +small-data-limit= |