Skip to content

Commit d194676

Browse files
Remove special case for simd_shuffle arg promotion
After rust-lang/stdarch#825, these intrinsics are now defined with `#[rustc_args_required_const(2)]`, so the special-case is no longer necessary.
1 parent e0e5d82 commit d194676

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/librustc_mir/transform/promote_consts.rs

-12
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use rustc_span::{Span, DUMMY_SP};
2424
use syntax::ast::LitKind;
2525

2626
use rustc_index::vec::{Idx, IndexVec};
27-
use rustc_target::spec::abi::Abi;
2827

2928
use std::cell::Cell;
3029
use std::{cmp, iter, mem, usize};
@@ -218,17 +217,6 @@ impl<'tcx> Visitor<'tcx> for Collector<'_, 'tcx> {
218217

219218
if let TerminatorKind::Call { ref func, .. } = *kind {
220219
if let ty::FnDef(def_id, _) = func.ty(self.body, self.tcx).kind {
221-
let fn_sig = self.tcx.fn_sig(def_id);
222-
if let Abi::RustIntrinsic | Abi::PlatformIntrinsic = fn_sig.abi() {
223-
let name = self.tcx.item_name(def_id);
224-
// FIXME(eddyb) use `#[rustc_args_required_const(2)]` for shuffles.
225-
if name.as_str().starts_with("simd_shuffle") {
226-
self.candidates.push(Candidate::Argument { bb: location.block, index: 2 });
227-
228-
return; // Don't double count `simd_shuffle` candidates
229-
}
230-
}
231-
232220
if let Some(constant_args) = args_required_const(self.tcx, def_id) {
233221
for index in constant_args {
234222
self.candidates.push(Candidate::Argument { bb: location.block, index });

0 commit comments

Comments
 (0)