]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #107269 - bjorn3:sync_cg_clif-2023-01-24, r=bjorn3
authorbors <bors@rust-lang.org>
Fri, 27 Jan 2023 00:03:09 +0000 (00:03 +0000)
committerbors <bors@rust-lang.org>
Fri, 27 Jan 2023 00:03:09 +0000 (00:03 +0000)
Sync rustc_codegen_cranelift

For cg_clif itself there have been a couple of bug fixes since the last sync, a Cranelift update and implemented all remaining simd platform intrinsics used by `std::simd`. (`std::arch` still misses a lot though) Most of the diff is from reworking of the cg_clif build system though.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler

1  2 
compiler/rustc_codegen_cranelift/src/common.rs
compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

index b1adaa193b333b1e906281d961b4eb8e5f4ef096,52720daac6ffc673293c18b089290bebbb415798..d561cf139b6c9bca3ac97f0d985f006383916322
@@@ -660,11 -658,9 +659,11 @@@ fn codegen_regular_intrinsic_call<'tcx>
                  return;
              }
  
 -            if intrinsic == sym::assert_zero_valid && !fx.tcx.permits_zero_init(layout) {
 +            if intrinsic == sym::assert_zero_valid
 +                && !fx.tcx.permits_zero_init(fx.param_env().and(layout))
 +            {
                  with_no_trimmed_paths!({
-                     crate::base::codegen_panic(
+                     crate::base::codegen_panic_nounwind(
                          fx,
                          &format!(
                              "attempted to zero-initialize type `{}`, which is invalid",
              }
  
              if intrinsic == sym::assert_mem_uninitialized_valid
 -                && !fx.tcx.permits_uninit_init(layout)
 +                && !fx.tcx.permits_uninit_init(fx.param_env().and(layout))
              {
                  with_no_trimmed_paths!({
-                     crate::base::codegen_panic(
+                     crate::base::codegen_panic_nounwind(
                          fx,
                          &format!(
                              "attempted to leave type `{}` uninitialized, which is invalid",