Skip to content

Commit 4f9898a

Browse files
committed
Auto merge of #100958 - mikebenfield:workaround, r=nikic
compiler/rustc_codegen_ssa/src/mir/place.rs: Remove LLVM bug workaround This memset was inserted as a workaround to Rust issue #34427, which was an LLVM bug that apparently no longer manifests.
2 parents eac6c33 + 12a9914 commit 4f9898a

File tree

1 file changed

+0
-11
lines changed
  • compiler/rustc_codegen_ssa/src/mir

1 file changed

+0
-11
lines changed

compiler/rustc_codegen_ssa/src/mir/place.rs

-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::{FunctionCx, LocalRef};
44
use crate::common::IntPredicate;
55
use crate::glue;
66
use crate::traits::*;
7-
use crate::MemFlags;
87

98
use rustc_middle::mir;
109
use rustc_middle::mir::tcx::PlaceTy;
@@ -343,16 +342,6 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
343342
..
344343
} => {
345344
if variant_index != dataful_variant {
346-
if bx.cx().sess().target.arch == "arm"
347-
|| bx.cx().sess().target.arch == "aarch64"
348-
{
349-
// FIXME(#34427): as workaround for LLVM bug on ARM,
350-
// use memset of 0 before assigning niche value.
351-
let fill_byte = bx.cx().const_u8(0);
352-
let size = bx.cx().const_usize(self.layout.size.bytes());
353-
bx.memset(self.llval, fill_byte, size, self.align, MemFlags::empty());
354-
}
355-
356345
let niche = self.project_field(bx, tag_field);
357346
let niche_llty = bx.cx().immediate_backend_type(niche.layout);
358347
let niche_value = variant_index.as_u32() - niche_variants.start().as_u32();

0 commit comments

Comments
 (0)