Skip to content

Commit 7cbc8bc

Browse files
committed
Implement nontemporal_store using a regular store
1 parent 41af17a commit 7cbc8bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/intrinsics/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,12 +647,13 @@ fn codegen_regular_intrinsic_call<'tcx>(
647647
let val = CValue::by_ref(Pointer::new(ptr.load_scalar(fx)), inner_layout);
648648
ret.write_cvalue(fx, val);
649649
}
650-
sym::volatile_store | sym::unaligned_volatile_store => {
650+
sym::volatile_store | sym::unaligned_volatile_store | sym::nontemporal_store => {
651651
intrinsic_args!(fx, args => (ptr, val); intrinsic);
652652
let ptr = ptr.load_scalar(fx);
653653

654654
// Cranelift treats stores as volatile by default
655655
// FIXME correctly handle unaligned_volatile_store
656+
// FIXME actually do nontemporal stores if requested
656657
let dest = CPlace::for_ptr(Pointer::new(ptr), val.layout());
657658
dest.write_cvalue(fx, val);
658659
}

0 commit comments

Comments
 (0)