Skip to content

Ban projecting into SIMD types [MCP838] #143833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

scottmcm
Copy link
Member

Closes rust-lang/compiler-team#838

The actual compiler change here is tiny; there's just a bazillion tests to update.

Since I'm sure I've missed some, for now
r? ghost

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 12, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
##[group][AOT] mini_core_hello_world
[AOT] mini_core_hello_world

thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:80:25:
broken MIR in Item(DefId(0:61 ~ mini_core_hello_world[5866]::main)) (after phase change to runtime-optimized) at bb102[0]:
Projecting into SIMD type main::V is banned by MCP#838
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/390a0ab5dc4a895235a551e502c3893c3337731d/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/390a0ab5dc4a895235a551e502c3893c3337731d/library/core/src/panicking.rs:75:14
   2: <rustc_mir_transform::validate::CfgChecker>::fail::<alloc::string::String>
   3: <rustc_mir_transform::validate::Validator as rustc_mir_transform::pass_manager::MirPass>::run_pass
   4: rustc_mir_transform::pass_manager::run_passes_inner
   5: rustc_mir_transform::run_optimization_passes
   6: rustc_mir_transform::optimized_mir
      [... omitted 3 frames ...]
   7: <rustc_middle::ty::context::TyCtxt>::instance_mir
   8: rustc_monomorphize::mono_checks::check_mono_item
      [... omitted 3 frames ...]
   9: rustc_monomorphize::collector::items_of_instance
      [... omitted 3 frames ...]
  10: rustc_monomorphize::collector::collect_items_rec
  11: rustc_monomorphize::collector::collect_items_root
  12: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
  13: rustc_monomorphize::collector::collect_crate_mono_items
  14: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 3 frames ...]
  15: rustc_codegen_cranelift::driver::aot::run_aot
  16: <rustc_codegen_cranelift::CraneliftCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  17: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  18: rustc_interface::passes::start_codegen
  19: <rustc_interface::queries::Linker>::codegen_and_build_linker
  20: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  21: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  22: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  23: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, alloc::sync::Arc<rustc_data_structures::jobserver::Proxy>, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  24: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
  25: rustc_span::create_session_globals_then::<(), rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

warning: the ICE couldn't be written to `/checkout/compiler/rustc_codegen_cranelift/rustc-ice-2025-07-12T12_02_49-20618.txt`: Read-only file system (os error 30)

note: rustc 1.90.0-nightly (d4e3dccb0 2025-07-12) running on aarch64-unknown-linux-gnu

note: compiler flags: -C panic=abort -Z panic-abort-tests -Z codegen-backend=cranelift -C symbol-mangling-version=v0 -Z randomize-layout -Z unstable-options -Z macro-backtrace -C split-debuginfo=off -C link-arg=-L/usr/lib/llvm-19/lib -C llvm-args=-import-instr-limit=10 -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -C debuginfo=2 -C panic=abort -Z force-unstable-if-unmarked

query stack during panic:
#0 [optimized_mir] optimizing MIR for `main`
#1 [check_mono_item] monomorphization-time checking
#2 [items_of_instance] collecting items used by `main`
#3 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
"/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools/cg_clif/dist/rustc-clif" "-Csymbol-mangling-version=v0" "-Zrandomize-layout" "-Zunstable-options" "--check-cfg=cfg(bootstrap)" "--check-cfg=cfg(llvm_enzyme)" "-Zmacro-backtrace" "-Csplit-debuginfo=off" "-Clink-arg=-L/usr/lib/llvm-19/lib" "-Cllvm-args=-import-instr-limit=10" "-Clink-args=-Wl,-z,origin" "-Clink-args=-Wl,-rpath,$ORIGIN/../lib" "-Alinker-messages" "-L" "crate=/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools/cg_clif/build/example" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools/cg_clif/build/example" "-Cdebuginfo=2" "--target" "aarch64-unknown-linux-gnu" "-Cpanic=abort" "--check-cfg=cfg(jit)" "example/mini_core_hello_world.rs" exited with status ExitStatus(unix_wait_status(25856))
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:11:00
  local time: Sat Jul 12 12:02:49 UTC 2025
  network time: Sat, 12 Jul 2025 12:02:49 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ban projecting into repr(simd) types
3 participants