Skip to content

Commit

Permalink
Pass new instance instead of self.instance to simd_shuffle_indices.
Browse files Browse the repository at this point in the history
  • Loading branch information
jumbatm committed Dec 25, 2019
1 parent 697a38b commit d0dc932
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_codegen_ssa/mir/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,14 +618,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
if let mir::PlaceRef {
base:
&PlaceBase::Static(box Static {
kind: StaticKind::Promoted(promoted, _),
kind: StaticKind::Promoted(promoted, substs),
ty,
def_id: _,
def_id,
}),
projection: &[],
} = place.as_ref()
{
let c = bx.tcx().const_eval_promoted(self.instance, promoted);
let c = bx.tcx().const_eval_promoted(Instance::new(def_id, self.monomorphize(&substs)), promoted);
let (llval, ty) = self.simd_shuffle_indices(
&bx,
terminator.source_info.span,
Expand Down

0 comments on commit d0dc932

Please sign in to comment.