You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RISC-V LLVM feature +unaligned-scalar-mem not recognized by rustc #110883
warning: unknown feature specified for `-Ctarget-feature`: `unaligned-scalar-mem`
|
= note: it is still passed through to the codegen backend
= help: consider filing a feature request
warning: 1 warning emitted
Desired output
No warning
Background / Rationale
Some RISC-V cores support unaligned access to memory without trapping. On such cores, the compiler could significantly improve code-size and performance when using functions like core::ptr::read_unaligned by emitting a single load or store instruction with an unaligned address, rather than a long sequence of byte-sized load/store/bitmanip instructions.
I need to use the unaligned-scalar-mem target feature to improve code-size and performance. When I set the flag -C target-feature=+unaligned-scalar-mem, LLVM successfully recognizes the target feature and generates the desired machine code, but rustc prints out the warning above, and I can't figure out how to disable it.
Activity
Support RISC-V unaligned-scalar-mem target feature
Rollup merge of rust-lang#110884 - korran:unaligned-scalar-mem, r=wes…