Skip to content

rustc 1.34.0-nightly (da6ab956e 2019-01-27) and later make encoding_rs with packed_simd go from one .s to 31 .rcgu.s files #58023

Closed
@hsivonen

Description

@hsivonen

Steps to reproduce

  1. Clone https://github.com/hsivonen/encoding_rs
  2. cd encoding_rs
  3. git checkout simd
  4. rustup default rustup default 1.32.0
  5. rustup target add armv7-unknown-linux-gnueabihf
  6. RUSTC_BOOTSTRAP=1 RUSTFLAGS='-C target_feature=+neon,+thumb-mode,+thumb2' cargo rustc --target armv7-unknown-linux-gnueabihf --features simd-accel --release -- --emit asm
  7. find target | grep -c '\.s$'
  8. rm -rf target
  9. git checkout packed_simd
  10. rustup default nightly
  11. rustup target add thumbv7neon-unknown-linux-gnueabihf
  12. cargo rustc --target thumbv7neon-unknown-linux-gnueabihf --features simd-accel --release -- --emit asm
  13. find target | grep -c '\.s$'

Actual results

In the simd + Rust 1.32 case, there is one .s file. In the packed_simd + Rust 1.34 case, encoding_rs is split across 31 .s files. These are all .rcgu.s files. Examining these files suggests lesser inlining within encoding_rs, although code from packed_simd and core::arch appears to have gotten inlined.

Expected result

Expected one .s file with the same level of inlining in the packed_simd + Rust 1.34 case as with the simd + Rust 1.32 case.

Additional info

When building an actual binary from a different top-level crate (encoding_bench), the packed_simd + Rust 1.34 case regresses performance relative to the simd + Rust 1.32 on Exynos 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions