Skip to content

Commit d308b0b

Browse files
committed
Add support for Vector Multiply Add Saturated on PowerPC
1 parent 5d91eda commit d308b0b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/etc/platform-intrinsics/powerpc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@
156156
"llvm": "vupkh{1.kind}{1.data_type_short}",
157157
"ret": "s(16-32)",
158158
"args": ["0N"]
159+
},
160+
{
161+
"intrinsic": "madds",
162+
"width": [128],
163+
"llvm": "vmhaddshs",
164+
"ret": "s16",
165+
"args": ["0", "0", "0"]
159166
}
160167
]
161168
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
337337
output: &::I32x4,
338338
definition: Named("llvm.ppc.altivec.vupkhsh")
339339
},
340+
"_vec_madds" => Intrinsic {
341+
inputs: { static INPUTS: [&'static Type; 3] = [&::I16x8, &::I16x8, &::I16x8]; &INPUTS },
342+
output: &::I16x8,
343+
definition: Named("llvm.ppc.altivec.vmhaddshs")
344+
},
340345
_ => return None,
341346
})
342347
}

0 commit comments

Comments
 (0)