This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH, vectorizer]: Vectorize int -> double conversions
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: "Dorit Nuzman" <DORIT at il dot ibm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 23 Apr 2007 16:20:46 +0200
- Subject: Re: [RFC PATCH, vectorizer]: Vectorize int -> double conversions
- References: <5787cf470704230503m19305fedm416386cc8474afcf@mail.gmail.com>
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.