Skip to content
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

ICE when compiling packed_simd_2 #113500

Closed
Nugine opened this issue Jul 9, 2023 · 2 comments · Fixed by #113529
Closed

ICE when compiling packed_simd_2 #113500

Nugine opened this issue Jul 9, 2023 · 2 comments · Fixed by #113529
Assignees
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Nugine
Copy link
Contributor

Nugine commented Jul 9, 2023

https://github.com/Nugine/simd-benches/actions/runs/5497445756/jobs/10018184737

Meta

rustc --version --verbose:

rustc 1.72.0-nightly (83964c156 2023-07-08)
binary: rustc
commit-hash: 83964c156db1f444050a38b2498dbd0da6d5d503
commit-date: 2023-07-08
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

Error output

error: internal compiler error: /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/compiler/rustc_codegen_ssa/src/mir/constant.rs:70:22: Ty(
                                    Const { ty: [u32; 16], kind: Branch([Leaf(0x00000000), Leaf(0x00000010), Leaf(0x00000001), Leaf(0x00000011), Leaf(0x00000002), Leaf(0x00000012), Leaf(0x00000003), Leaf(0x00000013), Leaf(0x00000004), Leaf(0x00000014), Leaf(0x00000005), Leaf(0x00000015), Leaf(0x00000006), Leaf(0x00000016), Leaf(0x00000007), Leaf(0x00000017)]) },
                                )
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/packed_simd_2-0.3.8/src/codegen/llvm.rs:55:26
   |
55 |     simd_shuffle16(x, y, IDX)
   |                          ^^^

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/compiler/rustc_errors/src/lib.rs:995:33
stack backtrace:
   0:     0x7f2166f7aa71 - std::backtrace_rs::backtrace::libunwind::trace::h4e1458b4a9fb4e6f
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f2166f7aa71 - std::backtrace_rs::backtrace::trace_unsynchronized::hab78200fa9cb4924
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f2166f7aa71 - std::sys_common::backtrace::_print_fmt::hcfea8b2400713c36
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f2166f7aa71 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3e59532c1e143911
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f2166fe0d7f - core::fmt::rt::Argument::fmt::h9df7228410758d1a
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/core/src/fmt/rt.rs:138:9
   5:     0x7f2166fe0d7f - core::fmt::write::h8469ff0e5aa7b2a8
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f2166f6d4b7 - std::io::Write::write_fmt::hf942e53f0bebad10
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/io/mod.rs:1714:15
   7:     0x7f2166f7a885 - std::sys_common::backtrace::_print::hb60701aae549e88f
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f2166f7a885 - std::sys_common::backtrace::print::h5a926053ebf6acdd
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f2166f7d663 - std::panicking::default_hook::{{closure}}::h9cb2c77fd9d08a16
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/panicking.rs:269:22
  10:     0x7f2166f7d3f4 - std::panicking::default_hook::hc22d719f1e0a6564
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/panicking.rs:288:9
  11:     0x7f216a25ec6b - rustc_driver_impl[2d6a85f1efddecb1]::install_ice_hook::{closure#0}
  12:     0x7f2166f7de8e - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h05534b3187a63b37
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/alloc/src/boxed.rs:2007:9
  13:     0x7f2166f7de8e - std::panicking::rust_panic_with_hook::h548300ff41a99ca1
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/panicking.rs:709:13
  14:     0x7f216a0fa441 - std[1ede75a6519e9681]::panicking::begin_panic::<rustc_errors[c0cefe3d099df7b4]::ExplicitBug>::{closure#0}
  15:     0x7f216a0f9fb6 - std[1ede75a6519e9681]::sys_common::backtrace::__rust_end_short_backtrace::<std[1ede75a6519e9681]::panicking::begin_panic<rustc_errors[c0cefe3d099df7b4]::ExplicitBug>::{closure#0}, !>
  16:     0x7f216a0bd986 - std[1ede75a6519e9681]::panicking::begin_panic::<rustc_errors[c0cefe3d099df7b4]::ExplicitBug>
  17:     0x7f216a0d9fd2 - <rustc_errors[c0cefe3d099df7b4]::HandlerInner>::span_bug::<rustc_span[2315e69a6c645816]::span_encoding::Span, alloc[b6f6cdd3965a641f]::string::String>
  18:     0x7f216a0d9df6 - <rustc_errors[c0cefe3d099df7b4]::Handler>::span_bug::<rustc_span[2315e69a6c645816]::span_encoding::Span, alloc[b6f6cdd3965a641f]::string::String>
  19:     0x7f216a0ee2cd - rustc_middle[1f0c398aabd4ddf9]::util::bug::opt_span_bug_fmt::<rustc_span[2315e69a6c645816]::span_encoding::Span>::{closure#0}
  20:     0x7f216a0ee2fa - rustc_middle[1f0c398aabd4ddf9]::ty::context::tls::with_opt::<rustc_middle[1f0c398aabd4ddf9]::util::bug::opt_span_bug_fmt<rustc_span[2315e69a6c645816]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f216a0ec97a - rustc_middle[1f0c398aabd4ddf9]::ty::context::tls::with_context_opt::<rustc_middle[1f0c398aabd4ddf9]::ty::context::tls::with_opt<rustc_middle[1f0c398aabd4ddf9]::util::bug::opt_span_bug_fmt<rustc_span[2315e69a6c645816]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f2168b4ce14 - rustc_middle[1f0c398aabd4ddf9]::util::bug::span_bug_fmt::<rustc_span[2315e69a6c645816]::span_encoding::Span>
  23:     0x7f2168bafd3d - <rustc_codegen_ssa[8acbb851ca316c41]::mir::FunctionCx<rustc_codegen_llvm[213bd859a847529f]::builder::Builder>>::simd_shuffle_indices
  24:     0x7f2168b836c3 - <core[29b2b76cf1b48b36]::iter::adapters::map::Map<core[29b2b76cf1b48b36]::iter::adapters::enumerate::Enumerate<core[29b2b76cf1b48b36]::slice::iter::Iter<rustc_middle[1f0c398aabd4ddf9]::mir::syntax::Operand>>, <rustc_codegen_ssa[8acbb851ca316c41]::mir::FunctionCx<rustc_codegen_llvm[213bd859a847529f]::builder::Builder>>::codegen_call_terminator::{closure#2}> as core[29b2b76cf1b48b36]::iter::traits::iterator::Iterator>::fold::<(), core[29b2b76cf1b48b36]::iter::traits::iterator::Iterator::for_each::call<rustc_codegen_ssa[8acbb851ca316c41]::mir::operand::OperandRef<&rustc_codegen_llvm[213bd859a847529f]::llvm_::ffi::Value>, <alloc[b6f6cdd3965a641f]::vec::Vec<rustc_codegen_ssa[8acbb851ca316c41]::mir::operand::OperandRef<&rustc_codegen_llvm[213bd859a847529f]::llvm_::ffi::Value>>>::extend_trusted<core[29b2b76cf1b48b36]::iter::adapters::map::Map<core[29b2b76cf1b48b36]::iter::adapters::enumerate::Enumerate<core[29b2b76cf1b48b36]::slice::iter::Iter<rustc_middle[1f0c398aabd4ddf9]::mir::syntax::Operand>>, <rustc_codegen_ssa[8acbb851ca316c41]::mir::FunctionCx<rustc_codegen_llvm[213bd859a847529f]::builder::Builder>>::codegen_call_terminator::{closure#2}>>::{closure#0}>::{closure#0}>
  25:     0x7f2168b834c3 - <alloc[b6f6cdd3965a641f]::vec::Vec<rustc_codegen_ssa[8acbb851ca316c41]::mir::operand::OperandRef<&rustc_codegen_llvm[213bd859a847529f]::llvm_::ffi::Value>> as alloc[b6f6cdd3965a641f]::vec::spec_from_iter::SpecFromIter<rustc_codegen_ssa[8acbb851ca316c41]::mir::operand::OperandRef<&rustc_codegen_llvm[213bd859a847529f]::llvm_::ffi::Value>, core[29b2b76cf1b48b36]::iter::adapters::map::Map<core[29b2b76cf1b48b36]::iter::adapters::enumerate::Enumerate<core[29b2b76cf1b48b36]::slice::iter::Iter<rustc_middle[1f0c398aabd4ddf9]::mir::syntax::Operand>>, <rustc_codegen_ssa[8acbb851ca316c41]::mir::FunctionCx<rustc_codegen_llvm[213bd859a847529f]::builder::Builder>>::codegen_call_terminator::{closure#2}>>>::from_iter
  26:     0x7f2168b38b50 - rustc_codegen_ssa[8acbb851ca316c41]::mir::codegen_mir::<rustc_codegen_llvm[213bd859a847529f]::builder::Builder>
  27:     0x7f216981636a - rustc_codegen_llvm[213bd859a847529f]::base::compile_codegen_unit::module_codegen
  28:     0x7f2169815469 - rustc_codegen_llvm[213bd859a847529f]::base::compile_codegen_unit
  29:     0x7f216987280f - rustc_codegen_ssa[8acbb851ca316c41]::base::codegen_crate::<rustc_codegen_llvm[213bd859a847529f]::LlvmCodegenBackend>
  30:     0x7f2169872116 - <rustc_codegen_llvm[213bd859a847529f]::LlvmCodegenBackend as rustc_codegen_ssa[8acbb851ca316c41]::traits::backend::CodegenBackend>::codegen_crate
  31:     0x7f216946f9a2 - <rustc_session[d2c5967be8e6b8f9]::session::Session>::time::<alloc[b6f6cdd3965a641f]::boxed::Box<dyn core[29b2b76cf1b48b36]::any::Any>, rustc_interface[b053cddf22540e47]::passes::start_codegen::{closure#0}>
  32:     0x7f216946f4eb - rustc_interface[b053cddf22540e47]::passes::start_codegen
  33:     0x7f216946919a - <rustc_middle[1f0c398aabd4ddf9]::ty::context::GlobalCtxt>::enter::<<rustc_interface[b053cddf22540e47]::queries::Queries>::ongoing_codegen::{closure#0}, core[29b2b76cf1b48b36]::result::Result<alloc[b6f6cdd3965a641f]::boxed::Box<dyn core[29b2b76cf1b48b36]::any::Any>, rustc_span[2315e69a6c645816]::ErrorGuaranteed>>
  34:     0x7f21694681b3 - <rustc_interface[b053cddf22540e47]::interface::Compiler>::enter::<rustc_driver_impl[2d6a85f1efddecb1]::run_compiler::{closure#1}::{closure#2}, core[29b2b76cf1b48b36]::result::Result<core[29b2b76cf1b48b36]::option::Option<rustc_interface[b053cddf22540e47]::queries::Linker>, rustc_span[2315e69a6c645816]::ErrorGuaranteed>>
  35:     0x7f21694612a5 - rustc_span[2315e69a6c645816]::set_source_map::<core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>, rustc_interface[b053cddf22540e47]::interface::run_compiler<core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>, rustc_driver_impl[2d6a85f1efddecb1]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  36:     0x7f2169460d16 - <scoped_tls[b9dcc93a263bd177]::ScopedKey<rustc_span[2315e69a6c645816]::SessionGlobals>>::set::<rustc_interface[b053cddf22540e47]::interface::run_compiler<core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>, rustc_driver_impl[2d6a85f1efddecb1]::run_compiler::{closure#1}>::{closure#0}, core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>>
  37:     0x7f21694602dc - std[1ede75a6519e9681]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b053cddf22540e47]::util::run_in_thread_pool_with_globals<rustc_interface[b053cddf22540e47]::interface::run_compiler<core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>, rustc_driver_impl[2d6a85f1efddecb1]::run_compiler::{closure#1}>::{closure#0}, core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>>
  38:     0x7f21694600a5 - <<std[1ede75a6519e9681]::thread::Builder>::spawn_unchecked_<rustc_interface[b053cddf22540e47]::util::run_in_thread_pool_with_globals<rustc_interface[b053cddf22540e47]::interface::run_compiler<core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>, rustc_driver_impl[2d6a85f1efddecb1]::run_compiler::{closure#1}>::{closure#0}, core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[29b2b76cf1b48b36]::result::Result<(), rustc_span[2315e69a6c645816]::ErrorGuaranteed>>::{closure#1} as core[29b2b76cf1b48b36]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  39:     0x7f2166f88305 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8fa82afee072a41e
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/alloc/src/boxed.rs:1993:9
  40:     0x7f2166f88305 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h99bb2872d0c67e87
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/alloc/src/boxed.rs:1993:9
  41:     0x7f2166f88305 - std::sys::unix::thread::Thread::new::thread_start::h51979755696e7814
                               at /rustc/83964c156db1f444050a38b2498dbd0da6d5d503/library/std/src/sys/unix/thread.rs:108:17
  42:     0x7f2166ccdb43 - <unknown>
  43:     0x7f2166d5fa00 - <unknown>
  44:                0x0 - <unknown>

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.72.0-nightly (83964c156 2023-07-08) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C linker-plugin-lto -C codegen-units=1 -C target-cpu=native

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `encoding_rs` (lib)
warning: build failed, waiting for other jobs to finish...
Error: 'cargo bench' returned an error (exit status: 101); unable to continue.

Backtrace

<backtrace>

@Nugine Nugine added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 9, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 9, 2023
@matthiaskrgr
Copy link
Member

This might be related to #112718 cc @oli-obk

@Noratrieb Noratrieb removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 9, 2023
@oli-obk oli-obk self-assigned this Jul 9, 2023
@std-move
Copy link

Reverting from 1065d876c 2023-07-09 to f4b80cacf 2023-06-30 (before #112718 was merged) fixes the issue for me.

@oli-obk oli-obk added the requires-nightly This issue requires a nightly compiler in some way. label Jul 10, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 13, 2023
…wesleywiser

Permit pre-evaluated constants in simd_shuffle

fixes rust-lang#113500
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 13, 2023
…wesleywiser

Permit pre-evaluated constants in simd_shuffle

fixes rust-lang#113500
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jul 20, 2023
…wesleywiser

Permit pre-evaluated constants in simd_shuffle

fixes rust-lang#113500
@bors bors closed this as completed in 8c17e07 Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants