public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/98848] New: [9/10/11 regression] vectorizer failed to reduce max pattern.
@ 2021-01-27  8:29 crazylht at gmail dot com
  2021-01-27  8:31 ` [Bug tree-optimization/98848] " crazylht at gmail dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: crazylht at gmail dot com @ 2021-01-27  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98848
           Summary: [9/10/11 regression] vectorizer failed to reduce max
                    pattern.
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

cat test.c

extern short a[9000];

int foo()
{ 
    int b;
    int i;
    b = a[0];

    for(i = 1; i < 9000; i ++) {
        if(a[i] < b) {
          b = a[i];
        }
    }
    return b;
}

gcc8 successfully vectorized the loop with option: -Ofast
-march=skylake-avx512, but gcc9/10/trunk failed.

test.c:9:16: missed: couldn't vectorize loop
test.c:3:5: missed: not vectorized: relevant phi not supported: b_14 = PHI
<_9(5), b_8(2)>
test.c:3:5: note: vectorized 0 loops in function.
test.c:14:10: note: ***** Analysis failed with vector mode V16HI
test.c:14:10: note: ***** Skipping vector mode V32QI, which would repeat the
analysis for V16HI

It seems vect_recog_widen_op_pattern failed to handle this???

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

end of thread, other threads:[~2023-07-07  9:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27  8:29 [Bug tree-optimization/98848] New: [9/10/11 regression] vectorizer failed to reduce max pattern crazylht at gmail dot com
2021-01-27  8:31 ` [Bug tree-optimization/98848] " crazylht at gmail dot com
2021-01-27  9:51 ` rguenth at gcc dot gnu.org
2021-01-27  9:52 ` rguenth at gcc dot gnu.org
2021-01-28 17:07 ` [Bug tree-optimization/98848] [9/10/11 regression] vectorizer failed to reduce max pattern since r9-1590 jakub at gcc dot gnu.org
2021-01-28 17:20 ` jakub at gcc dot gnu.org
2021-01-29  7:31 ` rguenther at suse dot de
2021-02-01  9:23 ` jakub at gcc dot gnu.org
2021-02-01  9:35 ` rguenther at suse dot de
2021-02-01 10:21 ` jakub at gcc dot gnu.org
2021-02-02  9:33 ` cvs-commit at gcc dot gnu.org
2021-02-02  9:34 ` [Bug tree-optimization/98848] [9/10 " jakub at gcc dot gnu.org
2021-06-01  8:19 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug tree-optimization/98848] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:43 ` jakub at gcc dot gnu.org
2023-07-07  9:22 ` rguenth 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).