public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/110018] New: Missing vectorizable_conversion(unsigned char -> double) for BB vectorizer
@ 2023-05-29  2:35 crazylht at gmail dot com
  2023-05-29  3:28 ` [Bug middle-end/110018] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: crazylht at gmail dot com @ 2023-05-29  2:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110018

            Bug ID: 110018
           Summary: Missing vectorizable_conversion(unsigned char ->
                    double) for BB vectorizer
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

When Looking at PR109812, I noticed there's missing vectorizable_conversion for
BB vectorizer when target doesn't support direct optab for unsigned char to
double. But actually it can be vectorized via unsigned char -> short/int/long
long -> double when vectorizable_conversion is ok for any of the immediate
type.

Currently, when modifier is NONE, vectorizable_conversion doesn't try any
immediate type, it can be extended similar like WIDEN.

 5158    case NONE:
 5159      if (code != FIX_TRUNC_EXPR
 5160          && code != FLOAT_EXPR
 5161          && !CONVERT_EXPR_CODE_P (code))
 5162        return false;
 5163      if (supportable_convert_operation (code, vectype_out, vectype_in,
&code1))
 5164        break;
 5165      /* FALLTHRU */

void
foo (double* __restrict a, unsigned char* b)
{
    a[0] = b[0];
    a[1] = b[1];
    a[2] = b[2];
    a[3] = b[3];
    a[4] = b[4];
    a[5] = b[5];
    a[6] = b[6];
    a[7] = b[7];
}

missed:   conversion not supported by target.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-06-26  7:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29  2:35 [Bug middle-end/110018] New: Missing vectorizable_conversion(unsigned char -> double) for BB vectorizer crazylht at gmail dot com
2023-05-29  3:28 ` [Bug middle-end/110018] " pinskia at gcc dot gnu.org
2023-05-29  5:53 ` crazylht at gmail dot com
2023-05-29  6:14 ` crazylht at gmail dot com
2023-05-30  7:57 ` rguenth at gcc dot gnu.org
2023-05-30  9:50 ` crazylht at gmail dot com
2023-06-21  2:33 ` cvs-commit at gcc dot gnu.org
2023-06-21  2:38 ` crazylht at gmail dot com
2023-06-21 14:35 ` cvs-commit at gcc dot gnu.org
2023-06-26  7:30 ` cvs-commit at gcc dot gnu.org
2023-06-26  7:49 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).