Skip to content

Commit

Permalink
Add support for Vector Sum Saturated on PowerPC
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed Sep 5, 2017
1 parent eec1c17 commit c3041e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/etc/platform-intrinsics/powerpc.json
Expand Up @@ -212,6 +212,13 @@
"llvm": "vsum4shs",
"ret": "s32",
"args": ["0N", "0"]
},
{
"intrinsic": "sums",
"width": [128],
"llvm": "vsumsws",
"ret": "s32",
"args": ["0", "0"]
}
]
}
5 changes: 5 additions & 0 deletions src/librustc_platform_intrinsics/powerpc.rs
Expand Up @@ -392,6 +392,11 @@ pub fn find(name: &str) -> Option<Intrinsic> {
output: &::I32x4,
definition: Named("llvm.ppc.altivec.vsum4shs")
},
"_vec_sums" => Intrinsic {
inputs: { static INPUTS: [&'static Type; 2] = [&::I32x4, &::I32x4]; &INPUTS },
output: &::I32x4,
definition: Named("llvm.ppc.altivec.vsumsws")
},
_ => return None,
})
}

0 comments on commit c3041e8

Please sign in to comment.