public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/114164] New: simdclone vectorization creates unsupported IL
@ 2024-02-29 11:28 rguenth at gcc dot gnu.org
  2024-02-29 11:30 ` [Bug tree-optimization/114164] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-29 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114164
           Summary: simdclone vectorization creates unsupported IL
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

For g++.dg/vect/pr68762-1.cc the simdclone vectorization with -mavx creates

   mask__18.266_50 = vect__8.265_48 == { 0, 0, 0, 0 };
   _52 = VEC_COND_EXPR <mask__18.266_50, { 1.0e+0, 1.0e+0, 1.0e+0, 1.0e+0 }, {
0.0, 0.0, 0.0, 0.0 }>;
   _53 = _Z3bazd.simdclone.5 (_51, _52);

but this isn't supported with AVX since here are integer vectors involved
but AVX only has FP support.

This causes the later vector lowering pass to lower this to

-  _35 = BIT_FIELD_REF <vect__8.265_48, 32, 0>;
-  _40 = _35 == 0;
-  _43 = _40 ? 1.0e+0 : 0.0;
-  _59 = BIT_FIELD_REF <vect__8.265_48, 32, 32>;
-  _62 = _59 == 0;
-  _41 = _62 ? 1.0e+0 : 0.0;
-  _60 = BIT_FIELD_REF <vect__8.265_48, 32, 64>;
-  _64 = _60 == 0;
-  _65 = _64 ? 1.0e+0 : 0.0;
-  _30 = BIT_FIELD_REF <vect__8.265_48, 32, 96>;
-  _31 = _30 == 0;
-  _27 = _31 ? 1.0e+0 : 0.0;
-  _52 = {_43, _41, _65, _27};

which is quite inefficient.

The vectorizer fails to verify the VEC_COND_EXPRs it creates are actually
supported by the target.

And the x86 target, for -mavx might actually support creating mask arguments
for in-branch OMP simd or if not it should probably not present them as
usable.

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

end of thread, other threads:[~2024-03-31  9:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 11:28 [Bug tree-optimization/114164] New: simdclone vectorization creates unsupported IL rguenth at gcc dot gnu.org
2024-02-29 11:30 ` [Bug tree-optimization/114164] " rguenth at gcc dot gnu.org
2024-02-29 17:42 ` jakub at gcc dot gnu.org
2024-03-01  2:29 ` liuhongt at gcc dot gnu.org
2024-03-01  9:32 ` rguenth at gcc dot gnu.org
2024-03-01 10:12 ` rguenth at gcc dot gnu.org
2024-03-04 12:41 ` cvs-commit at gcc dot gnu.org
2024-03-04 12:43 ` rguenth at gcc dot gnu.org
2024-03-31  9:48 ` pinskia 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).