rust-lang/rust · error
simd {}
Error message
simd {} What it means
An `unimplemented!("simd {}", name)` ICE at the end of `generic_simd_intrinsic` in rustc_codegen_gcc (non-master branch context). After all recognized `simd_*` intrinsic names are matched, any unmatched SIMD intrinsic name reaches this line and panics. It represents an unfinished SIMD intrinsic in the GCC backend's SIMD-lowering table.
Source
Thrown at compiler/rustc_codegen_gcc/src/intrinsic/simd.rs:1677
let after_block = bx.current_func().new_block("after");
let then_block = bx.current_func().new_block("then");
bx.llbb().end_with_conditional(None, mask, then_block, after_block);
bx.switch_to_block(then_block);
let lvalue = bx.context.new_array_access(None, pointer, i);
let value = bx.context.new_vector_access(None, values, i).to_rvalue();
bx.llbb().add_assignment(None, lvalue, value);
bx.llbb().end_with_jump(None, after_block);
bx.switch_to_block(after_block);
}
let dummy_value = bx.context.new_rvalue_zero(bx.int_type);
return Ok(dummy_value);
}
unimplemented!("simd {}", name);
}
#[cfg(feature = "master")]
fn simd_funnel_shift<'a, 'gcc, 'tcx>(
bx: &mut Builder<'a, 'gcc, 'tcx>,
a: RValue<'gcc>,
b: RValue<'gcc>,
shift: RValue<'gcc>,
shift_left: bool,
) -> RValue<'gcc> {
use crate::common::SignType;
let a_type = a.get_type();
let vector_type = a_type.unqualified().dyncast_vector().expect("vector type");
let num_units = vector_type.get_num_units();
let elem_type = vector_type.get_element_type();
let (new_int_type, int_shift_val, int_mask) = if elem_type.is_compatible_with(bx.u8_type)View on GitHub (pinned to 7088e4b63a)
Solutions
- Compile the same crate with the LLVM backend, which has complete SIMD intrinsic coverage.
- Rebuild cg_gcc from a tree that includes the `#[cfg(feature = "master")]` SIMD branches and verify the intrinsic name is matched.
- Avoid the specific `simd_*` intrinsic reported in the panic message (`name`); substitute an equivalent portable operation.
Example fix
// before (cg_gcc, unhandled simd intrinsic -> ICE)
use core::intrinsics::simd::simd_arith;
let r = unsafe { simd_arith(a, b) };
// after — LLVM backend, or express via std::simd lanes
let r = a + b; // Simd<...> supports operator overloading Defensive patterns
Strategy: fallback
Validate before calling
# Detect portable-simd / simd intrinsics + gcc backend
if grep -rqE 'std::simd|core::intrinsics::simd|simd_' src/ && [[ "${RUSTFLAGS:-}" == *codegen-backend=gcc* ]]; then
echo "avoid: cg_gcc SIMD table may be missing some intrinsics; use LLVM or rebuild with master"
fi Prevention
- Use the LLVM backend for `std::simd` / portable-simd code.
- Rebuild cg_gcc from a current tree with the master feature so the SIMD branches are compiled in.
- Note the exact `simd_*` name in the ICE and check it against cg_gcc's match list.
When it happens
Trigger: Calling a `core::intrinsics::simd_*` intrinsic (directly or via `std::simd` / portable-simd style code) whose `name` symbol is not handled by any earlier `#[cfg(feature = "master")]` branch in `generic_simd_intrinsic`, when compiling with cg_gcc. The remaining fallthrough at simd.rs:1677 fires.
Common situations: Using nightly `std::simd` / portable SIMD or hand-written `simd_*` intrinsics while the GCC backend is enabled and the particular intrinsic (e.g. a recently added one) is missing from cg_gcc's match list.
Related errors
AI-assisted analysis of rust-lang/rust@7088e4b63a (2026-08-10).
Data as JSON: /api/errors/841ac097f67f2be7.
Report an issue: GitHub.