Skip to content

Commit

Permalink
Rollup merge of rust-lang#66047 - ecstatic-morse:issue-66016, r=eddyb
Browse files Browse the repository at this point in the history
Don't double-count `simd_shuffle` promotion candidates

Resolves rust-lang#66016.

The `#[rustc_args_required_const]` attribute was added to `simd_shuffle*` in rust-lang/stdarch#825. This caused `promote_consts` to double-count its second argument when recording promotion candidates, which caused the promotion candidate compatibility check to fail.

Once `stdarch` is updated in-tree to include rust-lang/stdarch#825, all special logic around `simd_shuffle` can and should be removed.
  • Loading branch information
pietroalbini committed Nov 5, 2019
2 parents 6ad9f56 + 981e11e commit 80404bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_mir/transform/promote_consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ impl<'tcx> Visitor<'tcx> for Collector<'_, 'tcx> {
bb: location.block,
index: 2,
});

return; // Don't double count `simd_shuffle` candidates
}
}

Expand Down

0 comments on commit 80404bf

Please sign in to comment.