This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][match-and-simplify] Implement two-parameter builtin-function simplify
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 Aug 2014 16:39:39 +0200 (CEST)
- Subject: Re: [PATCH][match-and-simplify] Implement two-parameter builtin-function simplify
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1408061628510 dot 20733 at zhemvz dot fhfr dot qr>
On Wed, 6 Aug 2014, Richard Biener wrote:
>
> $subject, applied.
Err, too fast. Fixed.
Richard.
2014-08-06 Richard Biener <rguenther@suse.de>
* gimple-match-head.c (gimple_simplify): Fix implementation.
Index: gcc/gimple-match-head.c
===================================================================
--- gcc/gimple-match-head.c (revision 213671)
+++ gcc/gimple-match-head.c (working copy)
@@ -475,7 +475,10 @@ gimple_simplify (enum built_in_function
tree decl = builtin_decl_implicit (fn);
if (decl)
{
- tree res = fold_builtin_n (UNKNOWN_LOCATION, decl, &arg0, 2, false);
+ tree args[2];
+ args[0] = arg0;
+ args[1] = arg1;
+ tree res = fold_builtin_n (UNKNOWN_LOCATION, decl, args, 2, false);
if (res)
{
/* fold_builtin_n wraps the result inside a NOP_EXPR. */