public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
@ 2021-11-11 17:59 seurer at gcc dot gnu.org
  2021-11-12  7:39 ` [Bug target/103196] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: seurer at gcc dot gnu.org @ 2021-11-11 17:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103196
           Summary: [12 regression]
                    gcc.target/powerpc/p9-vec-length-full-7.c
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:8ed62c929c7c44627f41627e085e15d77b2e6ed4, r12-5129
make  -k check-gcc
RUNTESTFLAGS="powerpc.exp=gcc.target/powerpc/p9-vec-length-full-7.c"
FAIL: gcc.target/powerpc/p9-vec-length-full-7.c scan-assembler-times
\\mstxvl\\M 12
# of expected passes            1
# of unexpected failures        1

This was run on a power 9 but it fails on others, too.


commit 8ed62c929c7c44627f41627e085e15d77b2e6ed4 (HEAD, refs/bisect/bad)
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Wed Nov 10 15:58:15 2021 +0000

    middle-end: Add an RPO pass after successful vectorization

There used to be 12 stxvl instructions and now there are 14.  There are a bunch
of other changes and I am not sure if the new code is better or worse or if the
test case instruction count just needs updating.

seurer@marlin:~/gcc/git/build/gcc-test$ diff p9-vec-length-full-7.s.r12-5129
p9-vec-length-full-7.s.r12-5128
16c16
(the interesting parts...)
32,46c32,63
<       li 10,11
<       addi 7,6,16
<       addi 8,6,32
<       addi 6,6,48
<       addi 3,3,.LC0@toc@l
<       addi 4,4,.LC1@toc@l
<       addi 5,5,.LC2@toc@l
<       sldi 9,9,56
<       sldi 10,10,56
<       lxv 11,0(3)
<       lxv 12,0(4)
<       lxv 0,0(5)
<       stxvl 11,7,9
<       stxvl 12,8,9
<       stxvl 0,6,10
---
> 	li 3,43
> 	li 4,16
> 	addi 8,8,.LC0@toc@l
> 	vaddubm 1,1,1
> 	lxv 32,0(8)
> .L3:
> 	cmpldi 0,10,43
> 	sldi 7,9,56
> 	xxlor 0,32,32
> 	add 8,5,10
> 	vaddubm 0,0,1
> 	isel 9,3,10,1
> 	cmpldi 0,10,42
> 	addi 10,10,16
> 	stxvl 0,8,7
> 	subfic 9,9,43
> 	cmpldi 7,9,16
> 	isel 9,4,9,29
> 	bgtlr 0
> 	cmpldi 0,10,43
> 	sldi 7,9,56
> 	xxlor 0,32,32
> 	add 8,5,10
> 	vaddubm 0,0,1
> 	isel 9,3,10,1
> 	cmpldi 0,10,42
> 	addi 10,10,16
> 	stxvl 0,8,7
> 	subfic 9,9,43
> 	cmpldi 7,9,16
> 	isel 9,4,9,29
> 	ble 0,.L3
64,65c81
<       addis 6,2,.LANCHOR0@toc@ha
<       addis 8,2,.LANCHOR0+64@toc@ha
---
> 	addis 5,2,.LANCHOR0+64@toc@ha
67,68c83,84
<       addi 6,6,.LANCHOR0@toc@l
<       addi 8,8,.LANCHOR0+64@toc@l
---
> 	addi 5,5,.LANCHOR0+64@toc@l
> 	mr 8,5
70c86
< .L6:
---
> .L9:
76,79c92,95
<       bne 0,.L6
<       addis 3,2,.LC0@toc@ha
<       addis 4,2,.LC1@toc@ha
<       addis 5,2,.LC2@toc@ha
---
> 	bne 0,.L9
> 	addis 8,2,.LC0@toc@ha
> 	xxspltib 33,8
> 	li 10,16
81,95c97,128
<       li 10,11
<       addi 7,6,80
<       addi 8,6,96
<       addi 6,6,112
<       addi 3,3,.LC0@toc@l
<       addi 4,4,.LC1@toc@l
<       addi 5,5,.LC2@toc@l
<       sldi 9,9,56
<       sldi 10,10,56
<       lxv 11,0(3)
<       lxv 12,0(4)
<       lxv 0,0(5)
<       stxvl 11,7,9
<       stxvl 12,8,9
<       stxvl 0,6,10
---
> 	li 3,43
> 	li 4,16
> 	addi 8,8,.LC0@toc@l
> 	vaddubm 1,1,1
> 	lxv 32,0(8)
> .L10:
> 	cmpldi 0,10,43
> 	sldi 7,9,56
> 	xxlor 0,32,32
> 	add 8,5,10
> 	vaddubm 0,0,1
> 	isel 9,3,10,1
> 	cmpldi 0,10,42
> 	addi 10,10,16
> 	stxvl 0,8,7
> 	subfic 9,9,43
> 	cmpldi 7,9,16
> 	isel 9,4,9,29
> 	bgtlr 0
> 	cmpldi 0,10,43
> 	sldi 7,9,56
> 	xxlor 0,32,32
> 	add 8,5,10
> 	vaddubm 0,0,1
> 	isel 9,3,10,1
> 	cmpldi 0,10,42
> 	addi 10,10,16
> 	stxvl 0,8,7
> 	subfic 9,9,43
> 	cmpldi 7,9,16
> 	isel 9,4,9,29
> 	ble 0,.L10

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

* [Bug target/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
@ 2021-11-12  7:39 ` rguenth at gcc dot gnu.org
  2021-11-12  7:57 ` tnfchris at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-12  7:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug target/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
  2021-11-12  7:39 ` [Bug target/103196] " rguenth at gcc dot gnu.org
@ 2021-11-12  7:57 ` tnfchris at gcc dot gnu.org
  2022-02-24  0:39 ` linkw at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2021-11-12  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
I'm not an expert on the Power ISA either, but it kinda looks like that code
was unrolled.

The change is supposed to CSE redundant instructions early so perhaps it now
fits into your default rtl unroll insn count?

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

* [Bug target/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
  2021-11-12  7:39 ` [Bug target/103196] " rguenth at gcc dot gnu.org
  2021-11-12  7:57 ` tnfchris at gcc dot gnu.org
@ 2022-02-24  0:39 ` linkw at gcc dot gnu.org
  2022-02-25  8:48 ` linkw at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-02-24  0:39 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |linkw at gcc dot gnu.org
                 CC|                            |linkw at gcc dot gnu.org

--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
I'll have a look.

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

* [Bug target/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-02-24  0:39 ` linkw at gcc dot gnu.org
@ 2022-02-25  8:48 ` linkw at gcc dot gnu.org
  2022-03-09 14:15 ` [Bug testsuite/103196] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-02-25  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-02-25
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
The extra stxvl instructions are from the function with type int8 and uint8.
The commit r12-5129 changes the vectorized loop body slightly, it makes the
later cunroll pass have different estimated sizes for the unrolled loops and
makes different decisions to unroll it completely or not.

such as: for test_npeel_int8_t

before the commit, we have:

  Loop 1 likely iterates at most 3 times.
  size: 8-2, last_iteration: 8-4
    Loop size: 8
    Estimated size after unrolling: 14
  Not unrolling loop 1: size would grow.

right after that, we have:

  Loop 1 likely iterates at most 2 times.
  size: 8-4, last_iteration: 8-4
    Loop size: 8
    Estimated size after unrolling: 8

So the vectorized loop of test_npeel_int8_t gets unrolled completely.

The fix could be to disable pass tree-cunroll for this case.

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

* [Bug testsuite/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-02-25  8:48 ` linkw at gcc dot gnu.org
@ 2022-03-09 14:15 ` rguenth at gcc dot gnu.org
  2022-03-10  1:44 ` linkw at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-09 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |testsuite-fail

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Or adjust the testcase.  Please?

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

* [Bug testsuite/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-03-09 14:15 ` [Bug testsuite/103196] " rguenth at gcc dot gnu.org
@ 2022-03-10  1:44 ` linkw at gcc dot gnu.org
  2022-04-11  2:52 ` cvs-commit at gcc dot gnu.org
  2022-04-11  3:25 ` linkw at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-03-10  1:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> Or adjust the testcase.  Please?

Thanks for the suggestion! I adjusted the test case by making it not unrolled
any more, as the patch posted at
https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590959.html. It's still
pending on review. :)

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

* [Bug testsuite/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-03-10  1:44 ` linkw at gcc dot gnu.org
@ 2022-04-11  2:52 ` cvs-commit at gcc dot gnu.org
  2022-04-11  3:25 ` linkw at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-04-11  2:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:

https://gcc.gnu.org/g:3ac111372ecb73cc2464ab27e3bad75dfe88a34b

commit r12-8075-g3ac111372ecb73cc2464ab27e3bad75dfe88a34b
Author: Kewen Lin <linkw@linux.ibm.com>
Date:   Sun Apr 10 21:50:44 2022 -0500

    rs6000/test: Adjust p9-vec-length-{full,epil}-7.c [PR103196]

    As PR103196 shows, complete unrolling pass still takes effect even
    if we have specified the option "-fno-unroll-loops".  The loops in
    that case are not expected to be transformed by it, otherwise the
    expected counts change.  This patch is to add the disabling option
    to make them not sensitive to complete unrolling.

            PR testsuite/103196

    gcc/testsuite/ChangeLog:

            * gcc.target/powerpc/p9-vec-length-epil-7.c: Add option
            -fdisable-tree-cunroll.
            * gcc.target/powerpc/p9-vec-length-full-7.c: Likewise.

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

* [Bug testsuite/103196] [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c
  2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-04-11  2:52 ` cvs-commit at gcc dot gnu.org
@ 2022-04-11  3:25 ` linkw at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2022-04-11  3:25 UTC (permalink / raw)
  To: gcc-bugs

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Kewen Lin <linkw at gcc dot gnu.org> ---
Fixed on latest trunk.

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

end of thread, other threads:[~2022-04-11  3:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 17:59 [Bug target/103196] New: [12 regression] gcc.target/powerpc/p9-vec-length-full-7.c seurer at gcc dot gnu.org
2021-11-12  7:39 ` [Bug target/103196] " rguenth at gcc dot gnu.org
2021-11-12  7:57 ` tnfchris at gcc dot gnu.org
2022-02-24  0:39 ` linkw at gcc dot gnu.org
2022-02-25  8:48 ` linkw at gcc dot gnu.org
2022-03-09 14:15 ` [Bug testsuite/103196] " rguenth at gcc dot gnu.org
2022-03-10  1:44 ` linkw at gcc dot gnu.org
2022-04-11  2:52 ` cvs-commit at gcc dot gnu.org
2022-04-11  3:25 ` linkw 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).