This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/40348] Powerpc spe segfaults in vectorizing powf (a[i], 0.5f)
- From: "irar at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2009 07:59:57 -0000
- Subject: [Bug tree-optimization/40348] Powerpc spe segfaults in vectorizing powf (a[i], 0.5f)
- References: <bug-40348-15150@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from irar at il dot ibm dot com 2009-06-07 07:59 -------
So, I guess this patch fixes it?
Thanks,
Ira
Index: tree-vect-patterns.c
===================================================================
--- tree-vect-patterns.c (revision 148035)
+++ tree-vect-patterns.c (working copy)
@@ -515,6 +515,9 @@ vect_recog_pow_pattern (gimple last_stmt
&& REAL_VALUES_EQUAL (TREE_REAL_CST (exp), dconsthalf))
{
tree newfn = mathfn_built_in (TREE_TYPE (base), BUILT_IN_SQRT);
+ if (!newfn)
+ return NULL;
+
*type_in = get_vectype_for_scalar_type (TREE_TYPE (base));
if (*type_in)
{
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40348