@@ -466,12 +466,12 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(
466
466
let arg1_type = gcc_func. get_param_type ( 0 ) ;
467
467
let arg2_type = gcc_func. get_param_type ( 1 ) ;
468
468
let arg3_type = gcc_func. get_param_type ( 2 ) ;
469
- let arg5_type = gcc_func. get_param_type ( 4 ) ;
469
+ let arg4_type = gcc_func. get_param_type ( 3 ) ;
470
470
let a = builder. context . new_rvalue_from_vector ( None , arg1_type, & [ new_args[ 0 ] ; 8 ] ) ;
471
471
let b = builder. context . new_rvalue_from_vector ( None , arg2_type, & [ new_args[ 1 ] ; 8 ] ) ;
472
472
let c = builder. context . new_rvalue_from_vector ( None , arg3_type, & [ new_args[ 2 ] ; 8 ] ) ;
473
- let arg5 = builder. context . new_rvalue_from_int ( arg5_type , 4 ) ;
474
- args = vec ! [ a, b, c, new_args[ 3 ] , arg5 ] . into ( ) ;
473
+ let arg4 = builder. context . new_rvalue_from_int ( arg4_type , - 1 ) ;
474
+ args = vec ! [ a, b, c, arg4 , new_args[ 3 ] ] . into ( ) ;
475
475
}
476
476
_ => ( ) ,
477
477
}
@@ -604,7 +604,13 @@ pub fn adjust_intrinsic_arguments<'a, 'b, 'gcc, 'tcx>(
604
604
new_args[ 2 ] = builder. context . new_cast ( None , new_args[ 2 ] , builder. double_type ) ;
605
605
args = new_args. into ( ) ;
606
606
}
607
- "__builtin_ia32_sqrtsh_mask_round" => {
607
+ "__builtin_ia32_sqrtsh_mask_round"
608
+ | "__builtin_ia32_vcvtss2sh_mask_round"
609
+ | "__builtin_ia32_vcvtsd2sh_mask_round"
610
+ | "__builtin_ia32_vcvtsh2ss_mask_round"
611
+ | "__builtin_ia32_vcvtsh2sd_mask_round"
612
+ | "__builtin_ia32_rcpsh_mask"
613
+ | "__builtin_ia32_rsqrtsh_mask" => {
608
614
// The first two arguments are inverted, so swap them.
609
615
let mut new_args = args. to_vec ( ) ;
610
616
new_args. swap ( 0 , 1 ) ;
@@ -1192,11 +1198,11 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function
1192
1198
"llvm.x86.avx512fp16.mask.vfcmul.csh" => "__builtin_ia32_vfcmulcsh_mask_round" ,
1193
1199
"llvm.x86.avx512fp16.mask.vfmadd.cph.512" => "__builtin_ia32_vfmaddcph512_mask3_round" ,
1194
1200
"llvm.x86.avx512fp16.maskz.vfmadd.cph.512" => "__builtin_ia32_vfmaddcph512_maskz_round" ,
1195
- "llvm.x86.avx512fp16.mask.vfmadd.csh" => "__builtin_ia32_vfmaddcsh_mask3_round " ,
1201
+ "llvm.x86.avx512fp16.mask.vfmadd.csh" => "__builtin_ia32_vfmaddcsh_mask_round " ,
1196
1202
"llvm.x86.avx512fp16.maskz.vfmadd.csh" => "__builtin_ia32_vfmaddcsh_maskz_round" ,
1197
1203
"llvm.x86.avx512fp16.mask.vfcmadd.cph.512" => "__builtin_ia32_vfcmaddcph512_mask3_round" ,
1198
1204
"llvm.x86.avx512fp16.maskz.vfcmadd.cph.512" => "__builtin_ia32_vfcmaddcph512_maskz_round" ,
1199
- "llvm.x86.avx512fp16.mask.vfcmadd.csh" => "__builtin_ia32_vfcmaddcsh_mask_round " ,
1205
+ "llvm.x86.avx512fp16.mask.vfcmadd.csh" => "__builtin_ia32_vfcmaddcsh_mask3_round " ,
1200
1206
"llvm.x86.avx512fp16.maskz.vfcmadd.csh" => "__builtin_ia32_vfcmaddcsh_maskz_round" ,
1201
1207
"llvm.x86.avx512fp16.vfmadd.ph.512" => "__builtin_ia32_vfmaddph512_mask" ,
1202
1208
"llvm.x86.avx512fp16.vcvtsi642sh" => "__builtin_ia32_vcvtsi2sh64_round" ,
@@ -1209,7 +1215,7 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function
1209
1215
"llvm.x86.avx512.mask.load.pd.256" => "__builtin_ia32_loadapd256_mask" ,
1210
1216
"llvm.x86.avx512.mask.load.d.128" => "__builtin_ia32_movdqa32load128_mask" ,
1211
1217
"llvm.x86.avx512.mask.load.q.128" => "__builtin_ia32_movdqa64load128_mask" ,
1212
- "llvm.x86.avx512.mask.load.ps.128" => "__builtin_ia32_movdqa64load128_mask " ,
1218
+ "llvm.x86.avx512.mask.load.ps.128" => "__builtin_ia32_loadaps128_mask " ,
1213
1219
"llvm.x86.avx512.mask.load.pd.128" => "__builtin_ia32_loadapd128_mask" ,
1214
1220
"llvm.x86.avx512.mask.storeu.d.256" => "__builtin_ia32_storedqusi256_mask" ,
1215
1221
"llvm.x86.avx512.mask.storeu.q.256" => "__builtin_ia32_storedqudi256_mask" ,
@@ -1283,6 +1289,10 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function
1283
1289
"llvm.x86.avx512fp16.mask.vcvttph2uqq.512" => "__builtin_ia32_vcvttph2uqq512_mask_round" ,
1284
1290
"llvm.x86.avx512fp16.mask.vcvtph2psx.512" => "__builtin_ia32_vcvtph2psx512_mask_round" ,
1285
1291
"llvm.x86.avx512fp16.mask.vcvtph2pd.512" => "__builtin_ia32_vcvtph2pd512_mask_round" ,
1292
+ "llvm.x86.avx512fp16.mask.vfcmadd.cph.256" => "__builtin_ia32_vfcmaddcph256_mask3" ,
1293
+ "llvm.x86.avx512fp16.mask.vfmadd.cph.256" => "__builtin_ia32_vfmaddcph256_mask3" ,
1294
+ "llvm.x86.avx512fp16.mask.vfcmadd.cph.128" => "__builtin_ia32_vfcmaddcph128_mask3" ,
1295
+ "llvm.x86.avx512fp16.mask.vfmadd.cph.128" => "__builtin_ia32_vfmaddcph128_mask3" ,
1286
1296
1287
1297
// TODO: support the tile builtins:
1288
1298
"llvm.x86.ldtilecfg" => "__builtin_trap" ,
0 commit comments