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.
This commit is contained in:
parent
e0e5d82e16
commit
d194676667
1 changed files with 0 additions and 12 deletions
|
@ -24,7 +24,6 @@ use rustc_span::{Span, DUMMY_SP};
|
||||||
use syntax::ast::LitKind;
|
use syntax::ast::LitKind;
|
||||||
|
|
||||||
use rustc_index::vec::{Idx, IndexVec};
|
use rustc_index::vec::{Idx, IndexVec};
|
||||||
use rustc_target::spec::abi::Abi;
|
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::{cmp, iter, mem, usize};
|
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 TerminatorKind::Call { ref func, .. } = *kind {
|
||||||
if let ty::FnDef(def_id, _) = func.ty(self.body, self.tcx).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) {
|
if let Some(constant_args) = args_required_const(self.tcx, def_id) {
|
||||||
for index in constant_args {
|
for index in constant_args {
|
||||||
self.candidates.push(Candidate::Argument { bb: location.block, index });
|
self.candidates.push(Candidate::Argument { bb: location.block, index });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue