Skip to content

Commit 0135bb1

Browse files
committed
RISC-V also has sane nontemporal stores
1 parent d1e92af commit 0135bb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: compiler/rustc_codegen_llvm/src/builder.rs

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

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

0 commit comments

Comments
 (0)