2011-06-10 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49361
* fold-const.c (fold_binary_loc): Only fold x * x to pow (x, 2.0)
when not already in gimple form.
From-SVN: r174903
+2011-06-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/49361
+ * fold-const.c (fold_binary_loc): Only fold x * x to pow (x, 2.0)
+ when not already in gimple form.
+
2011-06-10 Richard Guenther <rguenther@suse.de>
PR bootstrap/49344
}
/* Optimize x*x as pow(x,2.0), which is expanded as x*x. */
- if (optimize_function_for_speed_p (cfun)
+ if (!in_gimple_form
+ && optimize_function_for_speed_p (cfun)
&& operand_equal_p (arg0, arg1, 0))
{
tree powfn = mathfn_built_in (type, BUILT_IN_POW);