Skip to content

Commit ccdfd7f

Browse files
committed
Add mradds to the powerpc intrinsics
1 parent a643bdc commit ccdfd7f

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
@@ -16,6 +16,13 @@
1616
"llvm": "vperm",
1717
"ret": "s32",
1818
"args": ["0", "0", "s8"]
19+
},
20+
{
21+
"intrinsic": "mradds",
22+
"width": [128],
23+
"llvm": "vmhraddshs",
24+
"ret": "s16",
25+
"args": ["0", "0", "0"]
1926
}
2027
]
2128
}

src/librustc_platform_intrinsics/powerpc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
2727
output: &::I32x4,
2828
definition: Named("llvm.ppc.altivec.vperm")
2929
},
30+
"_vec_mradds" => Intrinsic {
31+
inputs: { static INPUTS: [&'static Type; 3] = [&::I16x8, &::I16x8, &::I16x8]; &INPUTS },
32+
output: &::I16x8,
33+
definition: Named("llvm.ppc.altivec.vmhraddshs")
34+
},
3035
_ => return None,
3136
})
3237
}

0 commit comments

Comments
 (0)