Skip to content

Commit

Permalink
Don't double-count simd_shuffle promotion candidates
Browse files Browse the repository at this point in the history
The proper 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.
  • Loading branch information
ecstatic-morse committed Nov 2, 2019
1 parent f39205b commit 981e11e
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 981e11e

Please sign in to comment.