Skip to content

Commit ee111b2

Browse files
tests/assembly: use -Copt-level=3 instead of -O
1 parent b3464fa commit ee111b2

25 files changed

+29
-28
lines changed

tests/assembly/asm/aarch64-modifiers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ add-core-stubs
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: -O -C panic=abort
3+
//@ compile-flags: -Copt-level=3 -C panic=abort
44
//@ compile-flags: --target aarch64-unknown-linux-gnu
55
//@ compile-flags: -Zmerge-functions=disabled
66
//@ needs-llvm-components: aarch64
@@ -15,7 +15,7 @@ use minicore::*;
1515

1616
macro_rules! check {
1717
($func:ident $reg:ident $code:literal) => {
18-
// -O and extern "C" guarantee that the selected register is always r0/s0/d0/q0
18+
// -Copt-level=3 and extern "C" guarantee that the selected register is always r0/s0/d0/q0
1919
#[no_mangle]
2020
pub unsafe extern "C" fn $func() -> i32 {
2121
let y;

tests/assembly/asm/aarch64-outline-atomics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ assembly-output: emit-asm
2-
//@ compile-flags: -O
2+
//@ compile-flags: -Copt-level=3
33
//@ compile-flags: --target aarch64-unknown-linux-gnu
44
//@ needs-llvm-components: aarch64
55
//@ only-aarch64

tests/assembly/asm/arm-modifiers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ add-core-stubs
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: -O -C panic=abort
3+
//@ compile-flags: -Copt-level=3 -C panic=abort
44
//@ compile-flags: --target armv7-unknown-linux-gnueabihf
55
//@ compile-flags: -C target-feature=+neon
66
//@ compile-flags: -Zmerge-functions=disabled
@@ -21,7 +21,7 @@ impl Copy for f32x4 {}
2121

2222
macro_rules! check {
2323
($func:ident $modifier:literal $reg:ident $ty:ident $mov:literal) => {
24-
// -O and extern "C" guarantee that the selected register is always r0/s0/d0/q0
24+
// -Copt-level=3 and extern "C" guarantee that the selected register is always r0/s0/d0/q0
2525
#[no_mangle]
2626
pub unsafe extern "C" fn $func() -> $ty {
2727
let y;

tests/assembly/asm/x86-modifiers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ add-core-stubs
22
//@ revisions: x86_64 i686
33
//@ assembly-output: emit-asm
4-
//@ compile-flags: -O -C panic=abort
4+
//@ compile-flags: -Copt-level=3 -C panic=abort
55
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
66
//@[x86_64] needs-llvm-components: x86
77
//@[i686] compile-flags: --target i686-unknown-linux-gnu
@@ -20,7 +20,7 @@ use minicore::*;
2020

2121
macro_rules! check {
2222
($func:ident $modifier:literal $reg:ident $mov:literal) => {
23-
// -O and extern "C" guarantee that the selected register is always ax/xmm0
23+
// -Copt-level=3 and extern "C" guarantee that the selected register is always ax/xmm0
2424
#[no_mangle]
2525
pub unsafe extern "C" fn $func() -> i32 {
2626
let y;

tests/assembly/libs/issue-115339-zip-arrays.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ assembly-output: emit-asm
22
// # zen3 previously exhibited odd vectorization
3-
//@ compile-flags: --crate-type=lib -Ctarget-cpu=znver3 -O
3+
//@ compile-flags: --crate-type=lib -Ctarget-cpu=znver3 -Copt-level=3
44
//@ only-x86_64
55
//@ ignore-sgx
66

tests/assembly/manual-eq-efficient.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Regression test for #106269
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
3+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C llvm-args=-x86-asm-syntax=intel
44
//@ only-x86_64
55
//@ ignore-sgx
66

tests/assembly/panic-no-unwind-no-uwtable.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ assembly-output: emit-asm
22
//@ only-x86_64-unknown-linux-gnu
3-
//@ compile-flags: -C panic=unwind -C force-unwind-tables=n -O
3+
//@ compile-flags: -C panic=unwind -C force-unwind-tables=n -Copt-level=3
44

55
#![crate_type = "lib"]
66

tests/assembly/powerpc64-struct-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ revisions: elfv1-be elfv2-be elfv2-le aix
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: -O
3+
//@ compile-flags: -Copt-level=3
44
//@[elfv1-be] compile-flags: --target powerpc64-unknown-linux-gnu
55
//@[elfv1-be] needs-llvm-components: powerpc
66
//@[elfv2-be] compile-flags: --target powerpc64-unknown-linux-musl

tests/assembly/s390x-backchain-toggle.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ revisions: enable-backchain disable-backchain
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: -O --crate-type=lib --target=s390x-unknown-linux-gnu
3+
//@ compile-flags: -Copt-level=3 --crate-type=lib --target=s390x-unknown-linux-gnu
44
//@ needs-llvm-components: systemz
55
//@[enable-backchain] compile-flags: -Ctarget-feature=+backchain
66
//@[disable-backchain] compile-flags: -Ctarget-feature=-backchain

tests/assembly/s390x-vector-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ revisions: z10 z10_vector z13 z13_no_vector
22
// ignore-tidy-linelength
33
//@ assembly-output: emit-asm
4-
//@ compile-flags: -O -Z merge-functions=disabled
4+
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled
55
//@[z10] compile-flags: --target s390x-unknown-linux-gnu --cfg no_vector
66
//@[z10] needs-llvm-components: systemz
77
//@[z10_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector

tests/assembly/simd-bitmask.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//@ [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu
1111
//@ [aarch64] needs-llvm-components: aarch64
1212
//@ assembly-output: emit-asm
13-
//@ compile-flags: --crate-type=lib -O -C panic=abort
13+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C panic=abort
1414

1515
#![feature(no_core, lang_items, repr_simd, intrinsics)]
1616
#![no_core]

tests/assembly/simd-intrinsic-gather.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
44
//@ [x86-avx512] needs-llvm-components: x86
55
//@ assembly-output: emit-asm
6-
//@ compile-flags: --crate-type=lib -O -C panic=abort
6+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C panic=abort
77

88
#![feature(no_core, lang_items, repr_simd, intrinsics)]
99
#![no_core]

tests/assembly/simd-intrinsic-mask-load.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
77
//@ [x86-avx512] needs-llvm-components: x86
88
//@ assembly-output: emit-asm
9-
//@ compile-flags: --crate-type=lib -O -C panic=abort
9+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C panic=abort
1010

1111
#![feature(no_core, lang_items, repr_simd, intrinsics)]
1212
#![no_core]

tests/assembly/simd-intrinsic-mask-reduce.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//@ [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu
88
//@ [aarch64] needs-llvm-components: aarch64
99
//@ assembly-output: emit-asm
10-
//@ compile-flags: --crate-type=lib -O -C panic=abort
10+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C panic=abort
1111

1212
#![feature(no_core, lang_items, repr_simd, intrinsics)]
1313
#![no_core]

tests/assembly/simd-intrinsic-mask-store.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
77
//@ [x86-avx512] needs-llvm-components: x86
88
//@ assembly-output: emit-asm
9-
//@ compile-flags: --crate-type=lib -O -C panic=abort
9+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C panic=abort
1010

1111
#![feature(no_core, lang_items, repr_simd, intrinsics)]
1212
#![no_core]

tests/assembly/simd-intrinsic-scatter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq
44
//@ [x86-avx512] needs-llvm-components: x86
55
//@ assembly-output: emit-asm
6-
//@ compile-flags: --crate-type=lib -O -C panic=abort
6+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C panic=abort
77

88
#![feature(no_core, lang_items, repr_simd, intrinsics)]
99
#![no_core]

tests/assembly/simd-intrinsic-select.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//@ [aarch64] compile-flags: --target=aarch64-unknown-linux-gnu
99
//@ [aarch64] needs-llvm-components: aarch64
1010
//@ assembly-output: emit-asm
11-
//@ compile-flags: --crate-type=lib -O -C panic=abort
11+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C panic=abort
1212

1313
#![feature(no_core, lang_items, repr_simd, intrinsics)]
1414
#![no_core]

tests/assembly/simd/reduce-fadd-unordered.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ revisions: x86_64 aarch64
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: --crate-type=lib -O
3+
//@ compile-flags: --crate-type=lib -Copt-level=3
4+
45
//@[aarch64] only-aarch64
56
//@[x86_64] only-x86_64
67
//@[x86_64] compile-flags: -Ctarget-feature=+sse3

tests/assembly/slice-is_ascii.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//@ [WIN] only-windows
33
//@ [LIN] only-linux
44
//@ assembly-output: emit-asm
5-
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
5+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C llvm-args=-x86-asm-syntax=intel
66
//@ only-x86_64
77
//@ ignore-sgx
88

tests/assembly/x86-return-float.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Use the same target CPU as `i686` so that LLVM orders the instructions in the same order.
77
//@ compile-flags: -Ctarget-feature=+sse2 -Ctarget-cpu=pentium4
88
// Force frame pointers to make ASM more consistent between targets
9-
//@ compile-flags: -O -C force-frame-pointers
9+
//@ compile-flags: -Copt-level=3 -C force-frame-pointers
1010
//@ filecheck-flags: --implicit-check-not fld --implicit-check-not fst
1111
//@ revisions: normal win
1212
//@[normal] ignore-windows

tests/assembly/x86_64-array-pair-load-store-merge.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ assembly-output: emit-asm
2-
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
2+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C llvm-args=-x86-asm-syntax=intel
33
//@ only-x86_64
44
//@ ignore-sgx
55
//@ ignore-apple (manipulates rsp too)

tests/assembly/x86_64-bigint-helpers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ only-x86_64
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: --crate-type=lib -O -C target-cpu=x86-64-v4
3+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C target-cpu=x86-64-v4
44
//@ compile-flags: -C llvm-args=-x86-asm-syntax=intel
55
//@ revisions: llvm-pre-20 llvm-20
66
//@ [llvm-20] min-llvm-version: 20

tests/assembly/x86_64-floating-point-clamp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//@ assembly-output: emit-asm
55
// Set the base cpu explicitly, in case the default has been changed.
6-
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel -C target-cpu=x86-64
6+
//@ compile-flags: --crate-type=lib -Copt-level=3 -C llvm-args=-x86-asm-syntax=intel -C target-cpu=x86-64
77
//@ only-x86_64
88
//@ ignore-sgx
99

tests/assembly/x86_64-function-return.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//@ revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep
55
//@ assembly-output: emit-asm
6-
//@ compile-flags: -O
6+
//@ compile-flags: -Copt-level=3
77
//@ [keep] compile-flags: -Zfunction-return=keep
88
//@ [thunk-extern] compile-flags: -Zfunction-return=thunk-extern
99
//@ [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern

tests/assembly/x86_64-no-jump-tables.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
//@ revisions: unset set
55
//@ assembly-output: emit-asm
6-
//@ compile-flags: -O
6+
//@ compile-flags: -Copt-level=3
77
//@ [set] compile-flags: -Zno-jump-tables
88
//@ only-x86_64
99
//@ ignore-sgx

0 commit comments

Comments
 (0)