PR middle-end/50195
* fold-const.c (fold_binary_loc): Canonicalize x*x to pow (x, 2)
only when optimizing.
* gcc.dg/builtins-47.c: Optimize.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179752
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-10-10 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/50195
+ * fold-const.c (fold_binary_loc): Canonicalize x*x to pow (x, 2)
+ only when optimizing.
+
2011-10-10 Nick Clifton <nickc@redhat.com>
PR middle-end/49801
}
}
- /* Optimize x*x as pow(x,2.0), which is expanded as x*x. */
+ /* Canonicalize x*x as pow(x,2.0), which is expanded as x*x. */
if (!in_gimple_form
- && optimize_function_for_speed_p (cfun)
+ && optimize
&& operand_equal_p (arg0, arg1, 0))
{
tree powfn = mathfn_built_in (type, BUILT_IN_POW);
+2011-10-10 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/50195
+ * gcc.dg/builtins-47.c: Optimize.
+
2011-10-10 Aldy Hernandez <aldyh@redhat.com>
* lib/gcc-simulate-thread.exp: New.
/* { dg-do run } */
-/* { dg-options "-ffast-math -fdump-tree-gimple" } */
+/* { dg-options "-O -ffast-math -fdump-tree-gimple" } */
extern double sqrt (double);
extern double pow (double, double);