@@ -73,32 +73,30 @@ pub(crate) fn codegen_llvm_intrinsic_call<'tcx>(
73
73
kind => unreachable!( "kind {:?}" , kind) ,
74
74
} ;
75
75
76
- simd_pair_for_each_lane( fx, x, y, ret, |fx, lane_layout , res_lane_layout , x_lane, y_lane| {
77
- let res_lane = match lane_layout . ty . kind( ) {
76
+ simd_pair_for_each_lane( fx, x, y, ret, & |fx, lane_ty , res_lane_ty , x_lane, y_lane| {
77
+ let res_lane = match lane_ty . kind( ) {
78
78
ty:: Float ( _) => fx. bcx. ins( ) . fcmp( flt_cc, x_lane, y_lane) ,
79
- _ => unreachable!( "{:?}" , lane_layout . ty ) ,
79
+ _ => unreachable!( "{:?}" , lane_ty ) ,
80
80
} ;
81
- bool_to_zero_or_max_uint( fx, res_lane_layout , res_lane)
81
+ bool_to_zero_or_max_uint( fx, res_lane_ty , res_lane)
82
82
} ) ;
83
83
} ;
84
84
"llvm.x86.sse2.psrli.d" , ( c a, o imm8) {
85
85
let imm8 = crate :: constant:: mir_operand_get_const_val( fx, imm8) . expect( "llvm.x86.sse2.psrli.d imm8 not const" ) ;
86
- simd_for_each_lane( fx, a, ret, |fx, _lane_layout , res_lane_layout , lane| {
87
- let res_lane = match imm8. try_to_bits( Size :: from_bytes( 4 ) ) . unwrap_or_else( || panic!( "imm8 not scalar: {:?}" , imm8) ) {
86
+ simd_for_each_lane( fx, a, ret, & |fx, _lane_ty , _res_lane_ty , lane| {
87
+ match imm8. try_to_bits( Size :: from_bytes( 4 ) ) . unwrap_or_else( || panic!( "imm8 not scalar: {:?}" , imm8) ) {
88
88
imm8 if imm8 < 32 => fx. bcx. ins( ) . ushr_imm( lane, i64 :: from( imm8 as u8 ) ) ,
89
89
_ => fx. bcx. ins( ) . iconst( types:: I32 , 0 ) ,
90
- } ;
91
- CValue :: by_val( res_lane, res_lane_layout)
90
+ }
92
91
} ) ;
93
92
} ;
94
93
"llvm.x86.sse2.pslli.d" , ( c a, o imm8) {
95
94
let imm8 = crate :: constant:: mir_operand_get_const_val( fx, imm8) . expect( "llvm.x86.sse2.psrli.d imm8 not const" ) ;
96
- simd_for_each_lane( fx, a, ret, |fx, _lane_layout , res_lane_layout , lane| {
97
- let res_lane = match imm8. try_to_bits( Size :: from_bytes( 4 ) ) . unwrap_or_else( || panic!( "imm8 not scalar: {:?}" , imm8) ) {
95
+ simd_for_each_lane( fx, a, ret, & |fx, _lane_ty , _res_lane_ty , lane| {
96
+ match imm8. try_to_bits( Size :: from_bytes( 4 ) ) . unwrap_or_else( || panic!( "imm8 not scalar: {:?}" , imm8) ) {
98
97
imm8 if imm8 < 32 => fx. bcx. ins( ) . ishl_imm( lane, i64 :: from( imm8 as u8 ) ) ,
99
98
_ => fx. bcx. ins( ) . iconst( types:: I32 , 0 ) ,
100
- } ;
101
- CValue :: by_val( res_lane, res_lane_layout)
99
+ }
102
100
} ) ;
103
101
} ;
104
102
"llvm.x86.sse2.storeu.dq" , ( v mem_addr, c a) {
0 commit comments