Skip to content

Commit eec1c17

Browse files
committed
Add support for Vector Sum Across Partial 1/4 Saturated on PowerPC
1 parent 668d8ff commit eec1c17

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

+14
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,20 @@
198198
"llvm": "vsum2sws",
199199
"ret": "s32",
200200
"args": ["0", "0"]
201+
},
202+
{
203+
"intrinsic": "sum4{0.kind}bs",
204+
"width": [128],
205+
"llvm": "vsum4{0.kind}bs",
206+
"ret": "i32",
207+
"args": ["0NN", "0"]
208+
},
209+
{
210+
"intrinsic": "sum4shs",
211+
"width": [128],
212+
"llvm": "vsum4shs",
213+
"ret": "s32",
214+
"args": ["0N", "0"]
201215
}
202216
]
203217
}

src/librustc_platform_intrinsics/powerpc.rs

+15
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,21 @@ pub fn find(name: &str) -> Option<Intrinsic> {
377377
output: &::I32x4,
378378
definition: Named("llvm.ppc.altivec.vsum2sws")
379379
},
380+
"_vec_sum4sbs" => Intrinsic {
381+
inputs: { static INPUTS: [&'static Type; 2] = [&::I8x16, &::I32x4]; &INPUTS },
382+
output: &::I32x4,
383+
definition: Named("llvm.ppc.altivec.vsum4sbs")
384+
},
385+
"_vec_sum4ubs" => Intrinsic {
386+
inputs: { static INPUTS: [&'static Type; 2] = [&::U8x16, &::U32x4]; &INPUTS },
387+
output: &::U32x4,
388+
definition: Named("llvm.ppc.altivec.vsum4ubs")
389+
},
390+
"_vec_sum4shs" => Intrinsic {
391+
inputs: { static INPUTS: [&'static Type; 2] = [&::I16x8, &::I32x4]; &INPUTS },
392+
output: &::I32x4,
393+
definition: Named("llvm.ppc.altivec.vsum4shs")
394+
},
380395
_ => return None,
381396
})
382397
}

0 commit comments

Comments
 (0)