public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/115382] New: Wrong code with in-order conditional reduction and masked loops
@ 2024-06-07  8:17 rguenth at gcc dot gnu.org
  2024-06-07 19:02 ` [Bug tree-optimization/115382] " rdapp at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-07  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115382
           Summary: Wrong code with in-order conditional reduction and
                    masked loops
           Product: gcc
           Version: 15.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: ---

vectorize_fold_left_reduction does

      if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))
        mask = vect_get_loop_mask (loop_vinfo, gsi, masks, vec_num, vectype_in,
i);
      else if (is_cond_op)
        mask = vec_opmask[i];

that doesn't work - both masks have to be combined.  This for example shows
in a runfail of gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c
with -march=cascadelake --param vect-partial-vector-usage=2 on x86_64.

The len-masking code looks good.

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

end of thread, other threads:[~2024-06-12  7:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-07  8:17 [Bug tree-optimization/115382] New: Wrong code with in-order conditional reduction and masked loops rguenth at gcc dot gnu.org
2024-06-07 19:02 ` [Bug tree-optimization/115382] " rdapp at gcc dot gnu.org
2024-06-10  6:18 ` rguenth at gcc dot gnu.org
2024-06-10  6:49 ` rdapp at gcc dot gnu.org
2024-06-10  7:12 ` rguenth at gcc dot gnu.org
2024-06-11 18:10 ` cvs-commit at gcc dot gnu.org
2024-06-12  7:03 ` rguenth at gcc dot gnu.org
2024-06-12  7:33 ` rdapp 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).