I'm trying to benchmark some Rust code, but I can't figure out how to set the "ffast-math" option.
% rustc -C opt-level=3 -C llvm-args='-enable-unsafe-fp-math' unrolled.rs
rustc: Unknown command line argument '-enable-unsafe-fp-math'. Try: 'rustc -help'
rustc: Did you mean '-enable-load-pre'?
llvm-args='-ffast-math'
and llvm-args='-fast'
didn't work either. What flag should I be using?
You can always use
rustc --emit llvm-ir
and compile the LLVM IR with the desired settings.