@@ -231,6 +231,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
231
231
}
232
232
else {
233
233
assert ! ( !( ( actual_ty. is_vector( ) && !expected_ty. is_vector( ) ) || ( !actual_ty. is_vector( ) && expected_ty. is_vector( ) ) ) , "{:?} ({}) -> {:?} ({}), index: {:?}[{}]" , actual_ty, actual_ty. is_vector( ) , expected_ty, expected_ty. is_vector( ) , func_ptr, index) ;
234
+ // TODO(antoyo): perhaps use __builtin_convertvector for vector casting.
234
235
self . bitcast ( actual_val, expected_ty)
235
236
}
236
237
}
@@ -1320,11 +1321,13 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
1320
1321
if vec_num_units < mask_num_units {
1321
1322
// NOTE: the mask needs to be the same length as the input vectors, so join the 2
1322
1323
// vectors and create a dummy second vector.
1324
+ // TODO(antoyo): switch to using new_vector_access.
1323
1325
let array = self . context . new_bitcast ( None , v1, array_type) ;
1324
1326
let mut elements = vec ! [ ] ;
1325
1327
for i in 0 ..vec_num_units {
1326
1328
elements. push ( self . context . new_array_access ( None , array, self . context . new_rvalue_from_int ( self . int_type , i as i32 ) ) . to_rvalue ( ) ) ;
1327
1329
}
1330
+ // TODO(antoyo): switch to using new_vector_access.
1328
1331
let array = self . context . new_bitcast ( None , v2, array_type) ;
1329
1332
for i in 0 ..vec_num_units {
1330
1333
elements. push ( self . context . new_array_access ( None , array, self . context . new_rvalue_from_int ( self . int_type , i as i32 ) ) . to_rvalue ( ) ) ;
@@ -1347,6 +1350,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
1347
1350
// NOTE: if padding was added, only select the number of elements of the masks to
1348
1351
// remove that padding in the result.
1349
1352
let mut elements = vec ! [ ] ;
1353
+ // TODO(antoyo): switch to using new_vector_access.
1350
1354
let array = self . context . new_bitcast ( None , result, array_type) ;
1351
1355
for i in 0 ..mask_num_units {
1352
1356
elements. push ( self . context . new_array_access ( None , array, self . context . new_rvalue_from_int ( self . int_type , i as i32 ) ) . to_rvalue ( ) ) ;
0 commit comments