Skip to content

add llvm bug for reductions on aarch64 #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions coresimd/ppsv/api/arithmetic_reductions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ macro_rules! impl_arithmetic_reductions {
#[inline]
pub fn sum(self) -> $elem_ty {
// FIXME: broken on AArch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x += self.extract(i) as $elem_ty;
Expand Down Expand Up @@ -55,6 +56,7 @@ macro_rules! impl_arithmetic_reductions {
#[inline]
pub fn product(self) -> $elem_ty {
// FIXME: broken on AArch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x *= self.extract(i) as $elem_ty;
Expand Down
6 changes: 6 additions & 0 deletions coresimd/ppsv/api/bitwise_reductions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ macro_rules! impl_bitwise_reductions {
#[inline]
pub fn and(self) -> $elem_ty {
// FIXME: broken on aarch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x &= self.extract(i) as $elem_ty;
Expand All @@ -39,6 +40,7 @@ macro_rules! impl_bitwise_reductions {
#[inline]
pub fn or(self) -> $elem_ty {
// FIXME: broken on aarch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x |= self.extract(i) as $elem_ty;
Expand All @@ -60,6 +62,7 @@ macro_rules! impl_bitwise_reductions {
#[inline]
pub fn xor(self) -> $elem_ty {
// FIXME: broken on aarch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x ^= self.extract(i) as $elem_ty;
Expand Down Expand Up @@ -88,6 +91,7 @@ macro_rules! impl_bool_bitwise_reductions {
#[inline]
pub fn and(self) -> $elem_ty {
// FIXME: broken on aarch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x &= self.extract(i) as $elem_ty;
Expand All @@ -110,6 +114,7 @@ macro_rules! impl_bool_bitwise_reductions {
#[inline]
pub fn or(self) -> $elem_ty {
// FIXME: broken on aarch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x |= self.extract(i) as $elem_ty;
Expand All @@ -132,6 +137,7 @@ macro_rules! impl_bool_bitwise_reductions {
#[inline]
pub fn xor(self) -> $elem_ty {
// FIXME: broken on aarch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
let mut x = self.extract(0) as $elem_ty;
for i in 1..$id::lanes() {
x ^= self.extract(i) as $elem_ty;
Expand Down
2 changes: 2 additions & 0 deletions coresimd/ppsv/api/boolean_reductions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ macro_rules! impl_bool_reductions {
#[inline]
pub fn all(self) -> bool {
// FIXME: Broken on AArch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
self.and()
}

Expand All @@ -35,6 +36,7 @@ macro_rules! impl_bool_reductions {
#[inline]
pub fn any(self) -> bool {
// FIXME: Broken on AArch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
self.or()
}

Expand Down
2 changes: 2 additions & 0 deletions coresimd/ppsv/api/minmax_reductions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ macro_rules! impl_minmax_reductions {
#[inline]
pub fn max(self) -> $elem_ty {
// FIXME: broken on AArch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
use ::num::Float;
use ::cmp::Ord;
let mut x = self.extract(0);
Expand Down Expand Up @@ -51,6 +52,7 @@ macro_rules! impl_minmax_reductions {
#[inline]
pub fn min(self) -> $elem_ty {
// FIXME: broken on AArch64
// https://bugs.llvm.org/show_bug.cgi?id=36796
use ::num::Float;
use ::cmp::Ord;
let mut x = self.extract(0);
Expand Down