Repository navigation
Description
We spotted in stdarch's CI that a recent change uncovered an error in LLVM when compiling core_arch: https://godbolt.org/z/eGaf7YKGf
Failed to config tile register, please define the shape earlier
Minimal LLVM IR repro by @sayantn: https://godbolt.org/z/KqeWaeKKE The RHS is what rust currently generates and has been shown to never compile on LLC (since 20.1). The only difference between the 2 is that the tile corresponding to %a is loaded before loading all fields of %b in the RHS.
I bisected the issue to #164578 but that PR probably only uncovered the error, while some change to rustc that changed the order of operations in LLVMIR would have caused the actual issue.
https://rust.godbolt.org/z/qrdbo1YPr is a repro in Rust. The input can be manipulated to avoid the error, for example by getting the tile dimensions from dst or by turning optimisations off.
Backtrace
Backtrace
$ cat /tmp/stdarch-amx-c.rs
#![feature(x86_amx_intrinsics, avx512_target_feature)]
#![allow(stable_features, improper_ctypes_definitions)]
use std::arch::x86_64::{__tile1024i, __tile_cmmimfp16ps};
#[unsafe(no_mangle)]
#[target_feature(enable = "amx-complex")]
pub unsafe extern "C" fn repro(dst: *mut __tile1024i, a: __tile1024i, b: __tile1024i) {
unsafe { __tile_cmmimfp16ps(dst, a, b) }
}
$ RUST_BACKTRACE=full rustc /tmp/stdarch-amx-c.rs --crate-type lib -O --emit=obj -o /tmp/stdarch-amx-c.o -Ztreat-err-as-bug=1
error: internal compiler error: repro: Failed to config tile register, please define the shape earlier
thread 'rustc' (3596394) panicked at /rustc-dev/8eb778d04094d3af4b26580cab327e0413eb1e02/compiler/rustc_errors/src/lib.rs:1446:17:
aborting due to `-Z treat-err-as-bug=1`
stack backtrace:
0: 0x71158e5fcc86 - <<std[75d981f13140cbe0]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[ab2f8d7ac3290d3a]::fmt::Display>::fmt
1: 0x71158ec10e69 - core[ab2f8d7ac3290d3a]::fmt::write
2: 0x71158e61183c - <std[75d981f13140cbe0]::sys::stdio::unix::Stderr as core[ab2f8d7ac3290d3a]::io::write::Write>::write_fmt
3: 0x71158e5cdd8a - std[75d981f13140cbe0]::panicking::default_hook::{closure#0}
4: 0x71158e5f05e3 - std[75d981f13140cbe0]::panicking::default_hook
5: 0x71158d36e761 - std[75d981f13140cbe0]::panicking::update_hook::<alloc[6f8a4980a9e162d9]::boxed::Box<rustc_driver_impl[7cdb0ac5bbe8c2e5]::install_ice_hook::{
closure#1}>>::{closure#0}
6: 0x71158e5f0a82 - std[75d981f13140cbe0]::panicking::panic_with_hook
7: 0x71158e5cde74 - std[75d981f13140cbe0]::panicking::panic_handler::{closure#0}
8: 0x71158e5c5279 - std[75d981f13140cbe0]::sys::backtrace::__rust_end_short_backtrace::<std[75d981f13140cbe0]::panicking::panic_handler::{closure#0}, !>
9: 0x71158e5cfb9d - __rustc[8c8e3d3194b7583f]::rust_begin_unwind
10: 0x71158af238fc - core[ab2f8d7ac3290d3a]::panicking::panic_fmt
11: 0x71158d3a597c - <rustc_errors[33bfac024ca7560f]::DiagCtxtInner>::panic_if_treat_err_as_bug
12: 0x7115901f27cc - <rustc_errors[33bfac024ca7560f]::DiagCtxtInner>::emit_diagnostic::{closure#3}
13: 0x7115901f08b8 - rustc_interface[2cc45a980df577dc]::callbacks::track_diagnostic::<core[ab2f8d7ac3290d3a]::option::Option<rustc_span[e66a16c774821dd5]::ErrorG
uaranteed>>
14: 0x7115901ef3fd - <rustc_errors[33bfac024ca7560f]::DiagCtxtInner>::emit_diagnostic
15: 0x7115901ef2bb - <rustc_errors[33bfac024ca7560f]::DiagCtxtHandle>::emit_diagnostic
16: 0x71159017d40c - <rustc_codegen_ssa[a279203ad243230d]::back::write::SharedEmitterMain>::check
17: 0x7115901811ec - <rustc_codegen_llvm[ef331c4ece37739b]::back::llvm_backend::LlvmCodegenBackend as rustc_codegen_ssa[a279203ad243230d]::traits::backend::Codeg
enBackend>::join_codegen
18: 0x711590182f2e - <rustc_interface[2cc45a980df577dc]::queries::Linker>::link
19: 0x71158ff0189c - rustc_interface[2cc45a980df577dc]::interface::run_compiler::<(), rustc_driver_impl[7cdb0ac5bbe8c2e5]::compiler_entrypoint::{closure#0}>::{cl
osure#2}
20: 0x71158ff82281 - std[75d981f13140cbe0]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[2cc45a980df577dc]::util::run_in_thread_with_globals<ru
stc_interface[2cc45a980df577dc]::util::run_in_thread_pool_with_globals<rustc_interface[2cc45a980df577dc]::interface::run_compiler<(), rustc_driver_impl[7cdb0ac5bbe8c2e
5]::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
21: 0x71158ff8202d - <std[75d981f13140cbe0]::thread::lifecycle::spawn_unchecked<rustc_interface[2cc45a980df577dc]::util::run_in_thread_with_globals<rustc_interfa
ce[2cc45a980df577dc]::util::run_in_thread_pool_with_globals<rustc_interface[2cc45a980df577dc]::interface::run_compiler<(), rustc_driver_impl[7cdb0ac5bbe8c2e5]::compile
r_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[ab2f8d7ac3290d3a]::ops::function::FnOnce<()>>::call_
once::{shim:vtable#0}
22: 0x71158ff860ad - <std[75d981f13140cbe0]::sys::thread::unix::Thread>::new::thread_start
23: 0x711588e9cb84 - start_thread
at ./nptl/pthread_create.c:447:8
24: 0x711588f29ecc - clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
25: 0x0 - <unknown>
error: the compiler unexpectedly panicked. This is a bug
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: please make sure that you have updated to the latest nightly
note: please attach the file at `/home/adagem01/work/stdarch/rustc-ice-2026-11-13T17_13_35-3596376.txt` to your bug report
note: rustc 1.102.0-nightly (8eb778d04 2026-11-12) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -Z treat-err-as-bug=1
query stack during panic:
end of query stack
Activity
beetrees commentedon Nov 13, 2026
All the compiler explorer links go to https://rust.godbolt.org/z/qrdbo1YPr, I'm guessing that's not intended?
adamgemmell commentedon Nov 13, 2026
Nope, not at all, links fixed!
disable `assert_instr` on some amx tests
disable `assert_instr` on some amx tests
disable `assert_instr` on some amx tests
bardiharborow commentedon Nov 28, 2026
@rustbot label +A-LLVM +I-llvm-error +O-x86_64 +S-has-bisection +S-has-mcve +T-compiler -needs-triage