RISC-V LLVM feature +unaligned-scalar-mem not recognized by rustc #110883
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
A-target-feature
Area: Enabling/disabling target features like AVX, Neon, etc.
O-riscv
Target: RISC-V architecture
Example
Current output
Desired output
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.The text was updated successfully, but these errors were encountered: