|
1 | 1 | // ignore-tidy-linelength |
2 | 2 | //@ add-minicore |
3 | 3 | //@ revisions: ENABLE_SVE DISABLE_SVE DISABLE_NEON ENABLE_NEON |
4 | | -//@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu |
| 4 | +//@ compile-flags: --crate-type=rlib |
5 | 5 | //@ needs-llvm-components: aarch64 |
6 | 6 |
|
7 | 7 | // Rust made SVE require neon. |
| 8 | +//@ [ENABLE_SVE] compile-flags: --target=aarch64-unknown-linux-gnu |
8 | 9 | //@ [ENABLE_SVE] compile-flags: -C target-feature=+sve -Copt-level=0 |
9 | 10 | // ENABLE_SVE: attributes #0 |
10 | 11 | // ENABLE_SVE-SAME: +neon |
11 | 12 | // ENABLE_SVE-SAME: +sve |
12 | 13 |
|
13 | 14 | // However, disabling SVE does not disable neon. |
| 15 | +//@ [DISABLE_SVE] compile-flags: --target=aarch64-unknown-linux-gnu |
14 | 16 | //@ [DISABLE_SVE] compile-flags: -C target-feature=-sve -Copt-level=0 |
15 | 17 | // DISABLE_SVE: attributes #0 |
16 | 18 | // DISABLE_SVE-NOT: -neon |
17 | 19 | // DISABLE_SVE-SAME: -sve |
18 | 20 |
|
19 | 21 | // OTOH, neon fn `fp-armv8` are fully tied; toggling neon must toggle `fp-armv8` the same way. |
| 22 | +// Use the softfloat target as neon is a required feature on hardfloat targets |
| 23 | +//@ [DISABLE_NEON] compile-flags: --target=aarch64-unknown-none-softfloat |
20 | 24 | //@ [DISABLE_NEON] compile-flags: -C target-feature=-neon -Copt-level=0 |
21 | 25 | // DISABLE_NEON: attributes #0 |
22 | 26 | // DISABLE_NEON-SAME: -neon |
23 | 27 | // DISABLE_NEON-SAME: -fp-armv8 |
24 | 28 |
|
| 29 | +//@ [ENABLE_NEON] compile-flags: --target=aarch64-unknown-linux-gnu |
25 | 30 | //@ [ENABLE_NEON] compile-flags: -C target-feature=+neon -Copt-level=0 |
26 | 31 | // ENABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)|(\+fp-armv8,?)|(\+neon,?))*}}" } |
27 | 32 |
|
|
0 commit comments