Pass new instance instead of self.instance to simd_shuffle_indices.

This commit is contained in:
jumbatm 2019-12-24 18:29:53 +10:00
parent 697a38b17a
commit d0dc9323e1

View File

@ -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,