Skip to content

Commit cccf3e7

Browse files
committed
Add support for Vector Multiply Sum Saturated on PowerPC
1 parent 078c3dd commit cccf3e7

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@
184184
"llvm": "vmsumshm",
185185
"ret": "s32",
186186
"args": ["s16", "s16", "s32"]
187+
},
188+
{
189+
"intrinsic": "msum{0.kind}hs",
190+
"width": [128],
191+
"llvm": "vmsum{0.kind}hs",
192+
"ret": "i32",
193+
"args": ["0N", "0N", "0"]
187194
}
188195
]
189196
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,16 @@ pub fn find(name: &str) -> Option<Intrinsic> {
362362
output: &::I32x4,
363363
definition: Named("llvm.ppc.altivec.vmsumshm")
364364
},
365+
"_vec_msumshs" => Intrinsic {
366+
inputs: { static INPUTS: [&'static Type; 3] = [&::I16x8, &::I16x8, &::I32x4]; &INPUTS },
367+
output: &::I32x4,
368+
definition: Named("llvm.ppc.altivec.vmsumshs")
369+
},
370+
"_vec_msumuhs" => Intrinsic {
371+
inputs: { static INPUTS: [&'static Type; 3] = [&::U16x8, &::U16x8, &::U32x4]; &INPUTS },
372+
output: &::U32x4,
373+
definition: Named("llvm.ppc.altivec.vmsumuhs")
374+
},
365375
_ => return None,
366376
})
367377
}

0 commit comments

Comments
 (0)