From 396cf1e1f51ed37e320f47e0c7ff0dc7ddcb288b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 17 Feb 2024 09:57:24 +0100 Subject: require simd_insert, simd_extract indices to be constants --- compiler/rustc_codegen_ssa/src/mir/block.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler/rustc_codegen_ssa/src') diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 75d413dedad..00007110938 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -864,8 +864,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { .map(|(i, arg)| { // The indices passed to simd_shuffle in the // third argument must be constant. This is - // checked by const-qualification, which also - // promotes any complex rvalues to constants. + // checked by the type-checker. if i == 2 && intrinsic == sym::simd_shuffle { if let mir::Operand::Constant(constant) = &arg.node { let (llval, ty) = self.simd_shuffle_indices(bx, constant); -- cgit 1.4.1-3-g733a5