diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-02-18 21:28:56 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-02-18 21:29:06 -0800 |
| commit | d194676667f256e08dfb9fbc536d53d92bf8910f (patch) | |
| tree | 28740e0490ff45224581a702343aa8ff6b5b30f5 | |
| parent | e0e5d82e1677c82d209b214bbfc2cc5705c2336a (diff) | |
| download | rust-d194676667f256e08dfb9fbc536d53d92bf8910f.tar.gz rust-d194676667f256e08dfb9fbc536d53d92bf8910f.zip | |
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.
| -rw-r--r-- | src/librustc_mir/transform/promote_consts.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/librustc_mir/transform/promote_consts.rs b/src/librustc_mir/transform/promote_consts.rs index a5d59860c3d..9db9ab0de0b 100644 --- a/src/librustc_mir/transform/promote_consts.rs +++ b/src/librustc_mir/transform/promote_consts.rs @@ -24,7 +24,6 @@ use rustc_span::{Span, DUMMY_SP}; use syntax::ast::LitKind; use rustc_index::vec::{Idx, IndexVec}; -use rustc_target::spec::abi::Abi; use std::cell::Cell; use std::{cmp, iter, mem, usize}; @@ -218,17 +217,6 @@ impl<'tcx> Visitor<'tcx> for Collector<'_, 'tcx> { if let TerminatorKind::Call { ref func, .. } = *kind { if let ty::FnDef(def_id, _) = func.ty(self.body, self.tcx).kind { - let fn_sig = self.tcx.fn_sig(def_id); - if let Abi::RustIntrinsic | Abi::PlatformIntrinsic = fn_sig.abi() { - let name = self.tcx.item_name(def_id); - // FIXME(eddyb) use `#[rustc_args_required_const(2)]` for shuffles. - if name.as_str().starts_with("simd_shuffle") { - self.candidates.push(Candidate::Argument { bb: location.block, index: 2 }); - - return; // Don't double count `simd_shuffle` candidates - } - } - if let Some(constant_args) = args_required_const(self.tcx, def_id) { for index in constant_args { self.candidates.push(Candidate::Argument { bb: location.block, index }); |
