about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/mir
diff options
context:
space:
mode:
authorCaleb Zulawski <caleb.zulawski@gmail.com>2021-09-16 02:59:49 +0000
committerCaleb Zulawski <caleb.zulawski@gmail.com>2021-09-16 02:59:49 +0000
commit4a4ca941515399694227d720ece032e299470c91 (patch)
tree3c80702cc4ac3f93a893e8ea38788f3ecfa25321 /compiler/rustc_codegen_ssa/src/mir
parent1b3fe755ea3d39a1875f627fab5def4eae03e912 (diff)
downloadrust-4a4ca941515399694227d720ece032e299470c91.tar.gz
rust-4a4ca941515399694227d720ece032e299470c91.zip
Fix shuffle index constant not being monomorphized.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/block.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs
index 2ca7e8fd7e8..c7c577e6c78 100644
--- a/compiler/rustc_codegen_ssa/src/mir/block.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/block.rs
@@ -665,8 +665,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                         if i == 2 && intrinsic.as_str().starts_with("simd_shuffle") {
                             if let mir::Operand::Constant(constant) = arg {
                                 let c = self.eval_mir_constant(constant);
-                                let (llval, ty) =
-                                    self.simd_shuffle_indices(&bx, constant.span, constant.ty(), c);
+                                let (llval, ty) = self.simd_shuffle_indices(
+                                    &bx,
+                                    constant.span,
+                                    self.monomorphize(constant.ty()),
+                                    c,
+                                );
                                 return OperandRef {
                                     val: Immediate(llval),
                                     layout: bx.layout_of(ty),