about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/mir
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-09-19 17:31:29 +0900
committerGitHub <noreply@github.com>2021-09-19 17:31:29 +0900
commite675073e73d13a3a2d21f605de873b96ef642595 (patch)
tree9c2940ba3869fec09b4c605479a1153a62396fb3 /compiler/rustc_codegen_ssa/src/mir
parentebd31f5f1a51099038935e679b0eb92afa3364a5 (diff)
parent4a4ca941515399694227d720ece032e299470c91 (diff)
downloadrust-e675073e73d13a3a2d21f605de873b96ef642595.tar.gz
rust-e675073e73d13a3a2d21f605de873b96ef642595.zip
Rollup merge of #88855 - calebzulawski:feature/simd_shuffle, r=nagisa
Allow simd_shuffle to accept vectors of any length

cc ``@rust-lang/project-portable-simd`` ``@workingjubilee``
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 cd0e9354c24..0861aab2e31 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),