This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/40348] Powerpc spe segfaults in vectorizing powf (a[i], 0.5f)



------- 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


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