|
1 | 1 | //@ compile-flags: -O -C no-prepopulate-passes
|
2 |
| -//@ revisions: others riscv64 |
| 2 | +//@ revisions: others riscv64 loongarch64 |
3 | 3 |
|
4 | 4 | //@[others] ignore-riscv64
|
| 5 | +//@[others] ignore-loongarch64 |
5 | 6 |
|
6 | 7 | //@[riscv64] only-riscv64
|
7 | 8 | //@[riscv64] compile-flags: --target riscv64gc-unknown-linux-gnu
|
8 | 9 | //@[riscv64] needs-llvm-components: riscv
|
9 | 10 |
|
| 11 | +//@[loongarch64] only-loongarch64 |
| 12 | +//@[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu |
| 13 | +//@[loongarch64] needs-llvm-components: loongarch |
| 14 | + |
10 | 15 | #![crate_type = "lib"]
|
11 | 16 |
|
12 | 17 | #[no_mangle]
|
13 |
| -// others: define noundef i8 @arg_attr_u8(i8 noundef %x) |
14 |
| -// riscv64: define noundef i8 @arg_attr_u8(i8 noundef zeroext %x) |
| 18 | +// others: define noundef i8 @arg_attr_u8(i8 noundef %x) |
| 19 | +// riscv64: define noundef i8 @arg_attr_u8(i8 noundef zeroext %x) |
| 20 | +// loongarch64: define noundef i8 @arg_attr_u8(i8 noundef zeroext %x) |
15 | 21 | pub fn arg_attr_u8(x: u8) -> u8 {
|
16 | 22 | x
|
17 | 23 | }
|
18 | 24 |
|
19 | 25 | #[no_mangle]
|
20 |
| -// others: define noundef i16 @arg_attr_u16(i16 noundef %x) |
21 |
| -// riscv64: define noundef i16 @arg_attr_u16(i16 noundef zeroext %x) |
| 26 | +// others: define noundef i16 @arg_attr_u16(i16 noundef %x) |
| 27 | +// riscv64: define noundef i16 @arg_attr_u16(i16 noundef zeroext %x) |
| 28 | +// loongarch64: define noundef i16 @arg_attr_u16(i16 noundef zeroext %x) |
22 | 29 | pub fn arg_attr_u16(x: u16) -> u16 {
|
23 | 30 | x
|
24 | 31 | }
|
25 | 32 |
|
26 | 33 | #[no_mangle]
|
27 |
| -// others: define noundef i32 @arg_attr_u32(i32 noundef %x) |
28 |
| -// riscv64: define noundef i32 @arg_attr_u32(i32 noundef signext %x) |
| 34 | +// others: define noundef i32 @arg_attr_u32(i32 noundef %x) |
| 35 | +// riscv64: define noundef i32 @arg_attr_u32(i32 noundef signext %x) |
| 36 | +// loongarch64: define noundef i32 @arg_attr_u32(i32 noundef signext %x) |
29 | 37 | pub fn arg_attr_u32(x: u32) -> u32 {
|
30 | 38 | x
|
31 | 39 | }
|
32 | 40 |
|
33 | 41 | #[no_mangle]
|
34 |
| -// others: define noundef i64 @arg_attr_u64(i64 noundef %x) |
35 |
| -// riscv64: define noundef i64 @arg_attr_u64(i64 noundef %x) |
| 42 | +// others: define noundef i64 @arg_attr_u64(i64 noundef %x) |
| 43 | +// riscv64: define noundef i64 @arg_attr_u64(i64 noundef %x) |
| 44 | +// loongarch64: define noundef i64 @arg_attr_u64(i64 noundef %x) |
36 | 45 | pub fn arg_attr_u64(x: u64) -> u64 {
|
37 | 46 | x
|
38 | 47 | }
|
39 | 48 |
|
40 | 49 | #[no_mangle]
|
41 |
| -// others: define noundef i128 @arg_attr_u128(i128 noundef %x) |
42 |
| -// riscv64: define noundef i128 @arg_attr_u128(i128 noundef %x) |
| 50 | +// others: define noundef i128 @arg_attr_u128(i128 noundef %x) |
| 51 | +// riscv64: define noundef i128 @arg_attr_u128(i128 noundef %x) |
| 52 | +// loongarch64: define noundef i128 @arg_attr_u128(i128 noundef %x) |
43 | 53 | pub fn arg_attr_u128(x: u128) -> u128 {
|
44 | 54 | x
|
45 | 55 | }
|
46 | 56 |
|
47 | 57 | #[no_mangle]
|
48 |
| -// others: define noundef i8 @arg_attr_i8(i8 noundef %x) |
49 |
| -// riscv64: define noundef i8 @arg_attr_i8(i8 noundef signext %x) |
| 58 | +// others: define noundef i8 @arg_attr_i8(i8 noundef %x) |
| 59 | +// riscv64: define noundef i8 @arg_attr_i8(i8 noundef signext %x) |
| 60 | +// loongarch64: define noundef i8 @arg_attr_i8(i8 noundef signext %x) |
50 | 61 | pub fn arg_attr_i8(x: i8) -> i8 {
|
51 | 62 | x
|
52 | 63 | }
|
53 | 64 |
|
54 | 65 | #[no_mangle]
|
55 |
| -// others: define noundef i16 @arg_attr_i16(i16 noundef %x) |
56 |
| -// riscv64: define noundef i16 @arg_attr_i16(i16 noundef signext %x) |
| 66 | +// others: define noundef i16 @arg_attr_i16(i16 noundef %x) |
| 67 | +// riscv64: define noundef i16 @arg_attr_i16(i16 noundef signext %x) |
| 68 | +// loongarch64: define noundef i16 @arg_attr_i16(i16 noundef signext %x) |
57 | 69 | pub fn arg_attr_i16(x: i16) -> i16 {
|
58 | 70 | x
|
59 | 71 | }
|
60 | 72 |
|
61 | 73 | #[no_mangle]
|
62 |
| -// others: define noundef i32 @arg_attr_i32(i32 noundef %x) |
63 |
| -// riscv64: define noundef i32 @arg_attr_i32(i32 noundef signext %x) |
| 74 | +// others: define noundef i32 @arg_attr_i32(i32 noundef %x) |
| 75 | +// riscv64: define noundef i32 @arg_attr_i32(i32 noundef signext %x) |
| 76 | +// loongarch64: define noundef i32 @arg_attr_i32(i32 noundef signext %x) |
64 | 77 | pub fn arg_attr_i32(x: i32) -> i32 {
|
65 | 78 | x
|
66 | 79 | }
|
67 | 80 |
|
68 | 81 | #[no_mangle]
|
69 |
| -// others: define noundef i64 @arg_attr_i64(i64 noundef %x) |
70 |
| -// riscv64: define noundef i64 @arg_attr_i64(i64 noundef %x) |
| 82 | +// others: define noundef i64 @arg_attr_i64(i64 noundef %x) |
| 83 | +// riscv64: define noundef i64 @arg_attr_i64(i64 noundef %x) |
| 84 | +// loongarch64: define noundef i64 @arg_attr_i64(i64 noundef %x) |
71 | 85 | pub fn arg_attr_i64(x: i64) -> i64 {
|
72 | 86 | x
|
73 | 87 | }
|
74 | 88 |
|
75 | 89 | #[no_mangle]
|
76 |
| -// others: define noundef i128 @arg_attr_i128(i128 noundef %x) |
77 |
| -// riscv64: define noundef i128 @arg_attr_i128(i128 noundef %x) |
| 90 | +// others: define noundef i128 @arg_attr_i128(i128 noundef %x) |
| 91 | +// riscv64: define noundef i128 @arg_attr_i128(i128 noundef %x) |
| 92 | +// loongarch64: define noundef i128 @arg_attr_i128(i128 noundef %x) |
78 | 93 | pub fn arg_attr_i128(x: i128) -> i128 {
|
79 | 94 | x
|
80 | 95 | }
|
81 | 96 |
|
82 | 97 | #[no_mangle]
|
83 |
| -// others: define noundef zeroext i1 @arg_attr_bool(i1 noundef zeroext %x) |
84 |
| -// riscv64: define noundef zeroext i1 @arg_attr_bool(i1 noundef zeroext %x) |
| 98 | +// others: define noundef zeroext i1 @arg_attr_bool(i1 noundef zeroext %x) |
| 99 | +// riscv64: define noundef zeroext i1 @arg_attr_bool(i1 noundef zeroext %x) |
| 100 | +// loongarch64: define noundef zeroext i1 @arg_attr_bool(i1 noundef zeroext %x) |
85 | 101 | pub fn arg_attr_bool(x: bool) -> bool {
|
86 | 102 | x
|
87 | 103 | }
|
88 | 104 |
|
89 | 105 | #[no_mangle]
|
90 | 106 | // ignore-tidy-linelength
|
91 |
| -// others: define noundef range(i32 0, 1114112) i32 @arg_attr_char(i32 noundef{{( range\(i32 0, 1114112\))?}} %x) |
92 |
| -// riscv64: define noundef range(i32 0, 1114112) i32 @arg_attr_char(i32 noundef signext{{( range\(i32 0, 1114112\))?}} %x) |
| 107 | +// others: define noundef range(i32 0, 1114112) i32 @arg_attr_char(i32 noundef{{( range\(i32 0, 1114112\))?}} %x) |
| 108 | +// riscv64: define noundef range(i32 0, 1114112) i32 @arg_attr_char(i32 noundef signext{{( range\(i32 0, 1114112\))?}} %x) |
| 109 | +// loongarch64: define noundef range(i32 0, 1114112) i32 @arg_attr_char(i32 noundef signext{{( range\(i32 0, 1114112\))?}} %x) |
93 | 110 | pub fn arg_attr_char(x: char) -> char {
|
94 | 111 | x
|
95 | 112 | }
|
96 | 113 |
|
97 | 114 | #[no_mangle]
|
98 |
| -// others: define noundef float @arg_attr_f32(float noundef %x) |
99 |
| -// riscv64: define noundef float @arg_attr_f32(float noundef %x) |
| 115 | +// others: define noundef float @arg_attr_f32(float noundef %x) |
| 116 | +// riscv64: define noundef float @arg_attr_f32(float noundef %x) |
| 117 | +// loongarch64: define noundef float @arg_attr_f32(float noundef %x) |
100 | 118 | pub fn arg_attr_f32(x: f32) -> f32 {
|
101 | 119 | x
|
102 | 120 | }
|
103 | 121 |
|
104 | 122 | #[no_mangle]
|
105 |
| -// others: define noundef double @arg_attr_f64(double noundef %x) |
106 |
| -// riscv64: define noundef double @arg_attr_f64(double noundef %x) |
| 123 | +// others: define noundef double @arg_attr_f64(double noundef %x) |
| 124 | +// riscv64: define noundef double @arg_attr_f64(double noundef %x) |
| 125 | +// loongarch64: define noundef double @arg_attr_f64(double noundef %x) |
107 | 126 | pub fn arg_attr_f64(x: f64) -> f64 {
|
108 | 127 | x
|
109 | 128 | }
|
0 commit comments