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

Re: [RFC PATCH, vectorizer]: Vectorize int -> double conversions


On 4/23/07, Uros Bizjak <ubizjak@gmail.com> wrote:

Unfortunatelly, if correct optabs are not defined, compilation aborts
in vect_transform_stmt():

4351    case type_conversion_vec_info_type:
4352      done = vectorizable_conversion (stmt, bsi, &vec_stmt);
4353      gcc_assert (done);
4354      break;

vectorizable_conversion() returns false when it can't handle EXPAND
case due to missing optabs. Sure, we will abort then, but
vectorizable_convresion() has many other exits with "false". I'm kind
of out of ideas here how transformation should be skipped in this
case. This is why the patch is RFC only.

There is early exit if the operation is not supported by target. Correct condition should read:

 /* Supportable by target?  */
 if ((modifier == NONE
      && !targetm.vectorize.builtin_conversion (code, vectype_in))
     || (modifier == EXPAND
	  && !supportable_widening_operation (code, stmt, vectype_in,
					      &decl1, &decl2,
					      &code1, &code2)))
   {
     if (vect_print_dump_info (REPORT_DETAILS))
       fprintf (vect_dump, "op not supported by target.");
     return false;
   }

With this modification, compilation works for all cases.

Uros.


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