[Bug c/47892] Fails to vectorize comparison code, if-conversion fails

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 25 11:06:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47892

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-25 10:57:30 UTC ---
On trunk fixed with a patch as simple as

Index: gcc/tree-if-conv.c
===================================================================
*** gcc/tree-if-conv.c  (revision 170466)
--- gcc/tree-if-conv.c  (working copy)
*************** if_convertible_stmt_p (gimple stmt, VEC
*** 702,707 ****
--- 702,711 ----
      case GIMPLE_ASSIGN:
        return if_convertible_gimple_assign_stmt_p (stmt, refs);

+     case GIMPLE_CALL:
+       return (gimple_call_fndecl (stmt)
+             && (gimple_call_flags (stmt) & (ECF_PURE|ECF_CONST)));
+ 
      default:
        /* Don't know what to do with 'em so don't do anything.  */
        if (dump_file && (dump_flags & TDF_DETAILS))



More information about the Gcc-bugs mailing list