about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-10 13:55:59 +0000
committerbors <bors@rust-lang.org>2024-05-10 13:55:59 +0000
commit66f877007de6d575357ce8a0a85743f6cce3c06d (patch)
tree460fbf7f65d9f36fb5bc8b4dd886008f1fe68323 /compiler/rustc_codegen_llvm/src/builder.rs
parentcf774742b6029e0c2e00654975c001d192063b5b (diff)
parent95582e6fcbd5e62dd8f1148abc1689751357f036 (diff)
downloadrust-66f877007de6d575357ce8a0a85743f6cce3c06d.tar.gz
rust-66f877007de6d575357ce8a0a85743f6cce3c06d.zip
Auto merge of #124932 - RalfJung:temporal, r=compiler-errors
codegen: memmove/memset cannot be non-temporal

non-temporal memset is not a thing.
And for memmove, since the LLVM backend doesn't support this, surely we don't need it in the GCC backend.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 1a1b4ae3831..c85ace2ecd6 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -976,6 +976,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
         align: Align,
         flags: MemFlags,
     ) {
+        assert!(!flags.contains(MemFlags::NONTEMPORAL), "non-temporal memset not supported");
         let is_volatile = flags.contains(MemFlags::VOLATILE);
         unsafe {
             llvm::LLVMRustBuildMemSet(