This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][match-and-simplify] Implement two-parameter builtin-function simplify


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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]