@@ -1160,14 +1160,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
11601160 let res = func. new_local ( self . location , result_type, "saturating_sum" ) ;
11611161 let supports_native_type = self . is_native_int_type ( result_type) ;
11621162 let overflow = if supports_native_type {
1163- let func_name = match width {
1164- 8 => "__builtin_add_overflow" ,
1165- 16 => "__builtin_add_overflow" ,
1166- 32 => "__builtin_sadd_overflow" ,
1167- 64 => "__builtin_saddll_overflow" ,
1168- 128 => "__builtin_add_overflow" ,
1169- _ => unreachable ! ( ) ,
1170- } ;
1163+ let func_name = "__builtin_add_overflow" ;
11711164 let overflow_func = self . context . get_builtin_function ( func_name) ;
11721165 self . overflow_call ( overflow_func, & [ lhs, rhs, res. get_address ( self . location ) ] , None )
11731166 } else {
@@ -1231,14 +1224,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
12311224 let res = func. new_local ( self . location , result_type, "saturating_diff" ) ;
12321225 let supports_native_type = self . is_native_int_type ( result_type) ;
12331226 let overflow = if supports_native_type {
1234- let func_name = match width {
1235- 8 => "__builtin_sub_overflow" ,
1236- 16 => "__builtin_sub_overflow" ,
1237- 32 => "__builtin_ssub_overflow" ,
1238- 64 => "__builtin_ssubll_overflow" ,
1239- 128 => "__builtin_sub_overflow" ,
1240- _ => unreachable ! ( ) ,
1241- } ;
1227+ let func_name = "__builtin_sub_overflow" ;
12421228 let overflow_func = self . context . get_builtin_function ( func_name) ;
12431229 self . overflow_call ( overflow_func, & [ lhs, rhs, res. get_address ( self . location ) ] , None )
12441230 } else {
0 commit comments