From 8c3eb7750536d955af8d262fb6d080ae2606a817 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Fri, 3 Aug 2018 11:07:30 +0200 Subject: [PATCH] Use the correct parameter environment for simd shuffle arguments --- src/librustc_codegen_llvm/mir/block.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librustc_codegen_llvm/mir/block.rs b/src/librustc_codegen_llvm/mir/block.rs index 684ecfaeec8f1..ee23924bca897 100644 --- a/src/librustc_codegen_llvm/mir/block.rs +++ b/src/librustc_codegen_llvm/mir/block.rs @@ -520,12 +520,11 @@ impl FunctionCx<'a, 'll, 'tcx> { // and we can then extract the value by evaluating the promoted. mir::Operand::Copy(mir::Place::Promoted(box(index, ty))) | mir::Operand::Move(mir::Place::Promoted(box(index, ty))) => { - let param_env = ty::ParamEnv::reveal_all(); let cid = mir::interpret::GlobalId { instance: self.instance, promoted: Some(index), }; - let c = bx.tcx().const_eval(param_env.and(cid)); + let c = bx.tcx().const_eval(self.param_env.and(cid)); let (llval, ty) = self.simd_shuffle_indices( &bx, terminator.source_info.span,