Skip to content

Commit 697787a

Browse files
committed
RISC-V also has sane nontemporal stores
1 parent 28e0907 commit 697787a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/rustc_codegen_llvm/src/builder.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,8 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
737737
// a hint, and use regular stores everywhere else.
738738
// (In the future, we could alternatively ensure that an sfence gets emitted after a sequence of movnt
739739
// before any kind of synchronizing operation. But it's not clear how to do that with LLVM.)
740-
const WELL_BEHAVED_NONTEMPORAL_ARCHS: &[&str] = &["aarch64", "arm"];
740+
const WELL_BEHAVED_NONTEMPORAL_ARCHS: &[&str] =
741+
&["aarch64", "arm", "riscv32", "riscv64"];
741742

742743
let use_nontemporal =
743744
WELL_BEHAVED_NONTEMPORAL_ARCHS.contains(&&*self.cx.tcx.sess.target.arch);

0 commit comments

Comments
 (0)