Re: testsuite: Enable and adjust powerpc fold-vec-extract/insert testcases
commit23edcf6bee5d40f7c9b7dda04155b9e90b3b3379
authorAlan Modra <amodra@gmail.com>
Tue, 27 Oct 2020 23:37:44 +0000 (28 10:07 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 28 Oct 2020 22:43:15 +0000 (29 09:13 +1030)
treeb4c5dff8ec4ecaeb0b21b44aed3d037d6cf32870
parent24fb1d9c5855900b5229d8db445eba515c8375e3
Re: testsuite: Enable and adjust powerpc fold-vec-extract/insert testcases

git commit badeac77f552 changed expected number of addi instructions,
causing these fails on powerpc-linux.

gcc.target/powerpc/fold-vec-insert-int-p9.c: \\maddi\\M found 12 times
FAIL: gcc.target/powerpc/fold-vec-insert-int-p9.c scan-assembler-times \\maddi\\M 8
gcc.target/powerpc/fold-vec-extract-char.p9.c: addi found 6 times
FAIL: gcc.target/powerpc/fold-vec-extract-char.p9.c scan-assembler-times addi 3
gcc.target/powerpc/fold-vec-extract-int.p9.c: \\maddi\\M found 6 times
FAIL: gcc.target/powerpc/fold-vec-extract-int.p9.c scan-assembler-times \\maddi\\M 3
gcc.target/powerpc/fold-vec-extract-longlong.p7.c: \\maddi\\M found 6 times
FAIL: gcc.target/powerpc/fold-vec-extract-longlong.p7.c scan-assembler-times \\maddi\\M 4
gcc.target/powerpc/fold-vec-extract-longlong.p8.c: \\maddi\\M found 6 times
FAIL: gcc.target/powerpc/fold-vec-extract-longlong.p8.c scan-assembler-times \\maddi\\M 4
changed by badeac77f552

I'm not at all sure why we are counting addi.  On linux I see
eight in fold-vec-insert-int-p9.c tearing down the stack frame in
function epilogues, and four in
        addi 9,1,16
        lvewx 0,0,9
For aix you have the above four but with a -16 offset.  There are no
stack frames, and you have four addressing stack red-zone as
        addi 9,1,-64

fold-vec-extract-char.p9.c on linux just has epilogue addi, aix has
red-zone addressing.  The same for fold-vec-extract-int.p9.c,
fold-vec-extract-longlong.p7.c and fold-vec-extract-longlong.p8.c.

It seems silly to count addi in a function epilogue, and fragile to
count them in code.  So remove the ilp32 addi checks.

* gcc.target/powerpc/fold-vec-extract-char.p9.c: Don't check addi
count for ilp32.
* gcc.target/powerpc/fold-vec-extract-int.p9.c: Likewise.
* gcc.target/powerpc/fold-vec-extract-longlong.p7.c: Likewise.
* gcc.target/powerpc/fold-vec-extract-longlong.p8.c: Likewise.
* gcc.target/powerpc/fold-vec-insert-int-p9.c: Likewise.
gcc/testsuite/gcc.target/powerpc/fold-vec-extract-char.p9.c
gcc/testsuite/gcc.target/powerpc/fold-vec-extract-int.p9.c
gcc/testsuite/gcc.target/powerpc/fold-vec-extract-longlong.p7.c
gcc/testsuite/gcc.target/powerpc/fold-vec-extract-longlong.p8.c
gcc/testsuite/gcc.target/powerpc/fold-vec-insert-int-p9.c