@@ -231,6 +231,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
231231 }
232232 else {
233233 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.
234235 self . bitcast ( actual_val, expected_ty)
235236 }
236237 }
@@ -1320,11 +1321,13 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
13201321 if vec_num_units < mask_num_units {
13211322 // NOTE: the mask needs to be the same length as the input vectors, so join the 2
13221323 // vectors and create a dummy second vector.
1324+ // TODO(antoyo): switch to using new_vector_access.
13231325 let array = self . context . new_bitcast ( None , v1, array_type) ;
13241326 let mut elements = vec ! [ ] ;
13251327 for i in 0 ..vec_num_units {
13261328 elements. push ( self . context . new_array_access ( None , array, self . context . new_rvalue_from_int ( self . int_type , i as i32 ) ) . to_rvalue ( ) ) ;
13271329 }
1330+ // TODO(antoyo): switch to using new_vector_access.
13281331 let array = self . context . new_bitcast ( None , v2, array_type) ;
13291332 for i in 0 ..vec_num_units {
13301333 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> {
13471350 // NOTE: if padding was added, only select the number of elements of the masks to
13481351 // remove that padding in the result.
13491352 let mut elements = vec ! [ ] ;
1353+ // TODO(antoyo): switch to using new_vector_access.
13501354 let array = self . context . new_bitcast ( None , result, array_type) ;
13511355 for i in 0 ..mask_num_units {
13521356 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