Skip to content

Commit 668d8ff

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

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

+7
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@
191191
"llvm": "vmsum{0.kind}hs",
192192
"ret": "i32",
193193
"args": ["0N", "0N", "0"]
194+
},
195+
{
196+
"intrinsic": "sum2s",
197+
"width": [128],
198+
"llvm": "vsum2sws",
199+
"ret": "s32",
200+
"args": ["0", "0"]
194201
}
195202
]
196203
}

src/librustc_platform_intrinsics/powerpc.rs

+5
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
372372
output: &::U32x4,
373373
definition: Named("llvm.ppc.altivec.vmsumuhs")
374374
},
375+
"_vec_sum2s" => Intrinsic {
376+
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
377+
output: &::I32x4,
378+
definition: Named("llvm.ppc.altivec.vsum2sws")
379+
},
375380
_ => return None,
376381
})
377382
}

0 commit comments

Comments
 (0)