[AArch64] Fold max and min reduction builtins to tree.

gcc/
	* config/aarch64/aarch64-builtins
	(aarch64_gimple_fold_builtin): Fold reduc_<su><maxmin>_ builtins.

From-SVN: r198498
This commit is contained in:
James Greenhalgh 2013-05-01 15:18:18 +00:00 committed by James Greenhalgh
parent 998eaf975b
commit 1598945b00
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-05-01 James Greenhalgh <james.greenhalgh@arm.com>
* config/aarch64/aarch64-builtins
(aarch64_gimple_fold_builtin): Fold reduc_<su><maxmin>_ builtins.
2013-05-01 James Greenhalgh <james.greenhalgh@arm.com>
* config/aarch64/aarch64-simd-builtins.def

View File

@ -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;
}