diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ea469b8a33e..0b07091d0c6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-05-01 James Greenhalgh + + * config/aarch64/aarch64-builtins + (aarch64_gimple_fold_builtin): Fold reduc__ builtins. + 2013-05-01 James Greenhalgh * config/aarch64/aarch64-simd-builtins.def diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index 3016f256869..8eb32c65d35 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -1372,6 +1372,21 @@ aarch64_gimple_fold_builtin (gimple_stmt_iterator *gsi) args[0], NULL_TREE); break; + BUILTIN_VDQIF (UNOP, reduc_smax_, 10) + new_stmt = gimple_build_assign_with_ops ( + REDUC_MAX_EXPR, + gimple_call_lhs (stmt), + args[0], + NULL_TREE); + break; + BUILTIN_VDQIF (UNOP, reduc_smin_, 10) + new_stmt = gimple_build_assign_with_ops ( + REDUC_MIN_EXPR, + gimple_call_lhs (stmt), + args[0], + NULL_TREE); + break; + default: break; }