@@ -14,6 +14,7 @@ use rustc_span::{Span, Symbol, sym};
14
14
use rustc_target:: abi:: Align ;
15
15
16
16
use crate :: builder:: Builder ;
17
+ #[ cfg( feature="master" ) ]
17
18
use crate :: context:: CodegenCx ;
18
19
19
20
pub fn generic_simd_intrinsic < ' a , ' gcc , ' tcx > ( bx : & mut Builder < ' a , ' gcc , ' tcx > , name : Symbol , callee_ty : Ty < ' tcx > , args : & [ OperandRef < ' tcx , RValue < ' gcc > > ] , ret_ty : Ty < ' tcx > , llret_ty : Type < ' gcc > , span : Span ) -> Result < RValue < ' gcc > , ( ) > {
@@ -508,6 +509,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(bx: &mut Builder<'a, 'gcc, 'tcx>,
508
509
return simd_simple_float_intrinsic ( name, in_elem, in_ty, in_len, bx, span, args) ;
509
510
}
510
511
512
+ #[ cfg( feature="master" ) ]
511
513
fn vector_ty < ' gcc , ' tcx > ( cx : & CodegenCx < ' gcc , ' tcx > , elem_ty : Ty < ' tcx > , vec_len : u64 ) -> Type < ' gcc > {
512
514
// FIXME: use cx.layout_of(ty).llvm_type() ?
513
515
let elem_ty = match * elem_ty. kind ( ) {
@@ -519,6 +521,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(bx: &mut Builder<'a, 'gcc, 'tcx>,
519
521
cx. type_vector ( elem_ty, vec_len)
520
522
}
521
523
524
+ #[ cfg( feature="master" ) ]
522
525
fn gather < ' a , ' gcc , ' tcx > ( default : RValue < ' gcc > , pointers : RValue < ' gcc > , mask : RValue < ' gcc > , pointer_count : usize , bx : & mut Builder < ' a , ' gcc , ' tcx > , in_len : u64 , underlying_ty : Ty < ' tcx > , invert : bool ) -> RValue < ' gcc > {
523
526
let vector_type =
524
527
if pointer_count > 1 {
@@ -563,6 +566,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(bx: &mut Builder<'a, 'gcc, 'tcx>,
563
566
}
564
567
}
565
568
569
+ #[ cfg( feature="master" ) ]
566
570
if name == sym:: simd_gather {
567
571
// simd_gather(values: <N x T>, pointers: <N x *_ T>,
568
572
// mask: <N x i{M}>) -> <N x T>
@@ -663,6 +667,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(bx: &mut Builder<'a, 'gcc, 'tcx>,
663
667
return Ok ( gather ( args[ 0 ] . immediate ( ) , args[ 1 ] . immediate ( ) , args[ 2 ] . immediate ( ) , pointer_count, bx, in_len, underlying_ty, false ) ) ;
664
668
}
665
669
670
+ #[ cfg( feature="master" ) ]
666
671
if name == sym:: simd_scatter {
667
672
// simd_scatter(values: <N x T>, pointers: <N x *mut T>,
668
673
// mask: <N x i{M}>) -> ()
0 commit comments