stdarch: Inlining is broken in ARMv7+NEON
MWE:
#![feature(stdsimd,target_feature)]
extern crate stdsimd;
use ::stdsimd::arch::arm::int8x8_t;
#[inline]
#[target_feature(enable = "neon,v7")]
pub unsafe fn bar(x: int8x8_t) -> int8x8_t {
::stdsimd::arch::arm::vadd_s8(x, x)
}
pub unsafe fn foo(x: int8x8_t) -> int8x8_t {
bar(x)
}
produces:
foo::foo:
push {r11, lr}
vldr d0, [r1]
bl foo::bar
pop {r11, pc}
built using RUSTFLAGS="-C target-feature=+neon,+v7 -C lto=fat -C codegen-units=1 --emit asm -C debuginfo=0" CARGO_INCREMENTAL=0 cargo build --release --target=armv7-unknown-linux-gnueabihf.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (11 by maintainers)
Commits related to this issue
- Add `-C target-feature` to all functions Previously the features specified to LLVM via `-C target-feature` were only reflected in the `TargetMachine` but this change *also* reflects these and the bas... — committed to alexcrichton/rust by alexcrichton 6 years ago
- Auto merge of #50188 - alexcrichton:feature-all-the-things, r=eddyb Add `-C target-feature` to all functions Previously the features specified to LLVM via `-C target-feature` were only reflected in ... — committed to rust-lang/rust by bors 6 years ago
Yes it does: