diff options
| author | Michael Benfield <mbenfield@google.com> | 2022-08-24 05:26:04 +0000 |
|---|---|---|
| committer | Michael Benfield <mbenfield@google.com> | 2022-08-24 16:34:33 +0000 |
| commit | 12a9914a86a7fbf8a7101fe88918fa50441778a2 (patch) | |
| tree | 873acef4977259023c1b96c92521b94f97d572f0 | |
| parent | 25ea5a36c6e3a4fa1f739538d9e89eb1cd747564 (diff) | |
| download | rust-12a9914a86a7fbf8a7101fe88918fa50441778a2.tar.gz rust-12a9914a86a7fbf8a7101fe88918fa50441778a2.zip | |
Remove LLVM ARM bug workaround
This memset was inserted as a workaround to Rust issue #34427, which was an LLVM bug that apparently no longer manifests.
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/place.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/place.rs b/compiler/rustc_codegen_ssa/src/mir/place.rs index 268c4d76503..04b8c8636f6 100644 --- a/compiler/rustc_codegen_ssa/src/mir/place.rs +++ b/compiler/rustc_codegen_ssa/src/mir/place.rs @@ -4,7 +4,6 @@ use super::{FunctionCx, LocalRef}; use crate::common::IntPredicate; use crate::glue; use crate::traits::*; -use crate::MemFlags; use rustc_middle::mir; use rustc_middle::mir::tcx::PlaceTy; @@ -343,16 +342,6 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> { .. } => { if variant_index != dataful_variant { - if bx.cx().sess().target.arch == "arm" - || bx.cx().sess().target.arch == "aarch64" - { - // FIXME(#34427): as workaround for LLVM bug on ARM, - // use memset of 0 before assigning niche value. - let fill_byte = bx.cx().const_u8(0); - let size = bx.cx().const_usize(self.layout.size.bytes()); - bx.memset(self.llval, fill_byte, size, self.align, MemFlags::empty()); - } - let niche = self.project_field(bx, tag_field); let niche_llty = bx.cx().immediate_backend_type(niche.layout); let niche_value = variant_index.as_u32() - niche_variants.start().as_u32(); |
