Skip to content

Commit 4f6c03e

Browse files
committed
Add Vector Compare Bounds Floating-Point
1 parent ccdfd7f commit 4f6c03e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/etc/platform-intrinsics/powerpc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"llvm_prefix": "llvm.ppc.altivec.",
55
"number_info": {
66
"unsigned": {},
7-
"signed": {}
7+
"signed": {},
8+
"float": {}
89
},
910
"width_info": {
1011
"128": { "width": "" }
@@ -23,6 +24,13 @@
2324
"llvm": "vmhraddshs",
2425
"ret": "s16",
2526
"args": ["0", "0", "0"]
27+
},
28+
{
29+
"intrinsic": "cmpb",
30+
"width": [128],
31+
"llvm": "vcmpbfp",
32+
"ret": "s32",
33+
"args": ["f32", "f32"]
2634
}
2735
]
2836
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
3232
output: &::I16x8,
3333
definition: Named("llvm.ppc.altivec.vmhraddshs")
3434
},
35+
"_vec_cmpb" => Intrinsic {
36+
inputs: { static INPUTS: [&'static Type; 2] = [&::F32x4, &::F32x4]; &INPUTS },
37+
output: &::I32x4,
38+
definition: Named("llvm.ppc.altivec.vcmpbfp")
39+
},
3540
_ => return None,
3641
})
3742
}

0 commit comments

Comments
 (0)