This commit is contained in:
bjorn3 2024-08-22 11:08:13 +00:00
commit 46b7db19ae
3 changed files with 3 additions and 4 deletions

View File

@ -6,8 +6,7 @@
extern_types,
naked_functions,
thread_local,
repr_simd,
raw_ref_op
repr_simd
)]
#![no_core]
#![allow(dead_code, non_camel_case_types, internal_features)]

View File

@ -25,7 +25,7 @@ pub(crate) fn analyze(fx: &FunctionCx<'_, '_, '_>) -> IndexVec<Local, SsaKind> {
for stmt in bb.statements.iter() {
match &stmt.kind {
Assign(place_and_rval) => match &place_and_rval.1 {
Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
flag_map[place.local] = SsaKind::NotSsa;
}
_ => {}

View File

@ -595,7 +595,7 @@ fn codegen_stmt<'tcx>(
let val = cplace.to_cvalue(fx);
lval.write_cvalue(fx, val)
}
Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
let place = codegen_place(fx, place);
let ref_ = place.place_ref(fx, lval.layout());
lval.write_cvalue(fx, ref_);