diff options
| author | Folkert de Vries <flokkievids@gmail.com> | 2025-07-23 13:26:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-23 13:26:30 +0000 |
| commit | 0231fa9adfdc4c03d122087a4400a8199b97a369 (patch) | |
| tree | e783ca2321426d54b49a031bc9e3ceda4f076375 /tests/codegen/min-function-alignment.rs | |
| parent | 75fc5ceefb9dc46a1e0956143c98eb419ce2e3b5 (diff) | |
| parent | 8f0ffa8125f00af923098b30f390f6597b89d80d (diff) | |
| download | rust-0231fa9adfdc4c03d122087a4400a8199b97a369.tar.gz rust-0231fa9adfdc4c03d122087a4400a8199b97a369.zip | |
Merge pull request #1883 from Kobzol/pull
Rustc pull update
Diffstat (limited to 'tests/codegen/min-function-alignment.rs')
| -rw-r--r-- | tests/codegen/min-function-alignment.rs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/codegen/min-function-alignment.rs b/tests/codegen/min-function-alignment.rs deleted file mode 100644 index 6a3843b0f4f..00000000000 --- a/tests/codegen/min-function-alignment.rs +++ /dev/null @@ -1,46 +0,0 @@ -//@ revisions: align16 align1024 -//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 -Clink-dead-code -//@ [align16] compile-flags: -Zmin-function-alignment=16 -//@ [align1024] compile-flags: -Zmin-function-alignment=1024 -//@ ignore-wasm32 aligning functions is not currently supported on wasm (#143368) - -#![crate_type = "lib"] -#![feature(fn_align)] - -// Functions without explicit alignment use the global minimum. -// -// NOTE: this function deliberately has zero (0) attributes! That is to make sure that -// `-Zmin-function-alignment` is applied regardless of whether attributes are used. -// -// CHECK-LABEL: no_explicit_align -// align16: align 16 -// align1024: align 1024 -pub fn no_explicit_align() {} - -// CHECK-LABEL: @lower_align -// align16: align 16 -// align1024: align 1024 -#[no_mangle] -#[align(8)] -pub fn lower_align() {} - -// the higher value of min-function-alignment and the align attribute wins out -// -// CHECK-LABEL: @higher_align -// align16: align 32 -// align1024: align 1024 -#[no_mangle] -#[align(32)] -pub fn higher_align() {} - -// cold functions follow the same rules as other functions -// -// in GCC, the `-falign-functions` does not apply to cold functions, but -// `-Zmin-function-alignment` applies to all functions. -// -// CHECK-LABEL: @no_explicit_align_cold -// align16: align 16 -// align1024: align 1024 -#[no_mangle] -#[cold] -pub fn no_explicit_align_cold() {} |
