Skip to content

Commit 25234f8

Browse files
Add two new target-specific intrinsics mapping
1 parent 774c8a2 commit 25234f8

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/intrinsic/llvm.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,13 +1061,18 @@ pub fn intrinsic<'gcc, 'tcx>(name: &str, cx: &CodegenCx<'gcc, 'tcx>) -> Function
10611061

10621062
"llvm.x86.xgetbv" => "__builtin_ia32_xgetbv",
10631063
// NOTE: this doc specifies the equivalent GCC builtins: http://huonw.github.io/llvmint/llvmint/x86/index.html
1064+
// FIXME: Should handle other targets than `ia32`.
10641065
"llvm.sqrt.v2f64" => "__builtin_ia32_sqrtpd",
1066+
// FIXME: Should handle other targets than `ia32`.
1067+
"llvm.sqrt.v4f32" => "__builtin_ia32_sqrtps",
10651068
"llvm.sqrt.f32" => {
10661069
let gcc_name = "__builtin_sqrtf";
10671070
let func = cx.context.get_builtin_function(gcc_name);
10681071
cx.functions.borrow_mut().insert(gcc_name.to_string(), func);
10691072
return func;
10701073
}
1074+
// FIXME: Should handle other targets than `ia32`.
1075+
"llvm.smax.v4i32" => "__builtin_ia32_pmaxsd128",
10711076
"llvm.x86.avx512.pmul.dq.512" => "__builtin_ia32_pmuldq512_mask",
10721077
"llvm.x86.avx512.pmulu.dq.512" => "__builtin_ia32_pmuludq512_mask",
10731078
"llvm.x86.avx512.max.ps.512" => "__builtin_ia32_maxps512_mask",

0 commit comments

Comments
 (0)