Bug 102146 - [11 regression] several test cases fails after r11-8940
Summary: [11 regression] several test cases fails after r11-8940
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 11.2.1
: P2 normal
Target Milestone: 11.4
Assignee: Not yet assigned to anyone
URL:
Keywords: testsuite-fail
: 105267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-08-31 15:11 UTC by seurer
Modified: 2023-04-18 01:59 UTC (History)
6 users (show)

See Also:
Host: powerpc64le-linux-gnu
Target: powerpc64le-linux-gnu
Build: powerpc64le-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description seurer 2021-08-31 15:11:03 UTC
:d3d198940e5b527e76da7282cc2ce59045b4844, r11-8940

FAIL: gcc.target/powerpc/fusion-p10-ldcmpi.c scan-assembler-times lbz_cmpldi_cr0_QI_clobber_CCUNS_zero 2
FAIL: gcc.target/powerpc/fusion-p10-ldcmpi.c scan-assembler-times lha_cmpdi_cr0_HI_clobber_CC_sign 8
FAIL: gcc.target/powerpc/fusion-p10-ldcmpi.c scan-assembler-times lhz_cmpldi_cr0_HI_clobber_CCUNS_zero 2
FAIL: gcc.target/powerpc/fusion-p10-ldcmpi.c scan-assembler-times lwa_cmpdi_cr0_SI_EXTSI_CC_sign 3
FAIL: gcc.target/powerpc/fusion-p10-ldcmpi.c scan-assembler-times lwz_cmpldi_cr0_SI_EXTSI_CCUNS_zero 2
FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "\\(compare:CC \\((?:and|zero_extend):DI \\(reg:[SD]I" 1
FAIL: gcc.target/powerpc/pr81348.c scan-assembler \\mlxsihzx\\M
FAIL: gcc.target/powerpc/pr81348.c scan-assembler \\mvextsh2d\\M
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\mlwz\\M 2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\mplwz\\M 2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\mpstw\\M 2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\mstw\\M 2

These may just be tests that require adjusting the instruction counts to account for the changes introduced by this commit.

commit 7d3d198940e5b527e76da7282cc2ce59045b4844 (HEAD, refs/bisect/bad)
Author: Haochen Gui <guihaoc@gcc.gnu.org>
Date:   Fri Jun 4 11:04:31 2021 +0800

    rs6000: Expand PROMOTE_MODE marco in rs6000_promote_function_mode
Comment 1 HaoChen Gui 2021-09-02 08:24:26 UTC
For pr81348.c, it was already fixed by r11-8941. Segher backported it. 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100952#c12

PASS: gcc.target/powerpc/pr81348.c (test for excess errors)
PASS: gcc.target/powerpc/pr81348.c scan-assembler \\mlha\\M
PASS: gcc.target/powerpc/pr81348.c scan-assembler \\mmtvsrwa\\M
Comment 2 Richard Biener 2022-04-07 08:34:26 UTC
What's the status on the remaining failures?
Comment 3 Jakub Jelinek 2022-04-07 08:50:03 UTC
Looking at my 6 days old powerpc64le-linux testresults, I see from gcc.target/powerpc/ FAILures
FAIL: gcc.target/powerpc/compress-float-ppc-pic.c scan-assembler lfs
FAIL: gcc.target/powerpc/compress-float-ppc.c scan-assembler lfs
FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times std 4,8\\\\(3\\\\)\\\\n\\\\tstd 6,16\\\\(3\\\\) 1
FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stfd 1,8\\\\(3\\\\)\\\\n\\\\tstfd 3,16\\\\(3\\\\) 1
FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stw 4,4\\\\(3\\\\)\\\\n\\\\tstw 6,8\\\\(3\\\\) 1
FAIL: gcc.target/powerpc/lhs-1.c scan-assembler-times nop 3
FAIL: gcc.target/powerpc/lhs-2.c scan-assembler ori 1,1,0
FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "\\\\(compare:CC \\\\((?:and|zero_extend):(?:DI) \\\\((?:sub)?reg:[SD]I" 1
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mlwz\\\\M 2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mplwz\\\\M 2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mpstw\\\\M 2
FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mstw\\\\M 2
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^\\\\s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx

Comparing with GCC 11.1.0 results, that is
+FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times std 4,8\\\\(3\\\\)\\\\n\\\\tstd 6,16\\\\(3\\\\) 1
+FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stfd 1,8\\\\(3\\\\)\\\\n\\\\tstfd 3,16\\\\(3\\\\) 1
+FAIL: gcc.target/powerpc/fusion-p10-stst.c scan-assembler-times stw 4,4\\\\(3\\\\)\\\\n\\\\tstw 6,8\\\\(3\\\\) 1
+FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "\\\\(compare:CC \\\\((?:and|zero_extend):(?:DI) \\\\((?:sub)?reg:[SD]I" 1
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mlwz\\\\M 2
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mplwz\\\\M 2
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mpstw\\\\M 2
+FAIL: gcc.target/powerpc/prefix-no-update.c scan-assembler-times \\\\mstw\\\\M 2
regression.
Comment 4 HaoChen Gui 2022-04-08 01:19:38 UTC
(In reply to Richard Biener from comment #2)
> What's the status on the remaining failures?

For pr56605.c,I already submitted a patch. Waiting for review.
https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590958.html
Comment 5 HaoChen Gui 2022-04-08 01:26:16 UTC
For prefix-no-update.c, the patch Segher proposed in PR103197 could fix it.
Comment 6 Alexandre Oliva 2022-04-12 00:46:08 UTC
I confirm that segher's patch restores the expected insns in prefix-no-update.
Comment 7 GCC Commits 2022-04-13 01:43:24 UTC
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:

https://gcc.gnu.org/g:6b7cc7294770ecb57c0f3a116a27ce1aaff170b5

commit r12-8128-g6b7cc7294770ecb57c0f3a116a27ce1aaff170b5
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Tue Apr 12 22:41:45 2022 -0300

    ppc: testsuite: PROMOTE_MODE fallout pr56605 [PR102146]
    
    The test expects a compare of DImode values, but after the removal of
    PROMOTE_MODE from rs6000/, we get SImode.  Adjust the expectations.
    
    
    for  gcc/testsuite/ChangeLog
    
            PR target/102146
            * gcc.target/powerpc/pr56605.c: Accept SImode compare operand.
Comment 8 Richard Biener 2022-04-13 07:25:51 UTC
Defered to 11.4.
Comment 9 HaoChen Gui 2022-04-14 00:41:02 UTC
Could you backport the patch to GCC11? Thanks.
Comment 10 HaoChen Gui 2022-04-14 01:11:27 UTC
(In reply to HaoChen Gui from comment #9)
> Could you backport the patch to GCC11? Thanks.

Please ignore it as the patch has problem. Thanks.
Comment 11 GCC Commits 2022-04-21 21:31:20 UTC
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:26fa464f42622c60d6929720dd37143a21054ede

commit r12-8221-g26fa464f42622c60d6929720dd37143a21054ede
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Sun Jan 2 14:08:35 2022 +0000

    rs6000: Disparage lfiwzx and similar
    
    RA now chooses GEN_OR_VSX_REGS in most cases.  This is great in most
    cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is
    problematic because the integer load and store insns can use cheaper
    addressing modes.  We can fix that by putting a small penalty on the
    instruction alternatives for those.
    
    2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
    
            PR target/103197
            PR target/102146
            * config/rs6000/rs6000.md (zero_extendqi<mode>2 for EXTQI): Disparage
            the "Z" alternatives in {l,st}{f,xs}iwzx.
            (zero_extendhi<mode>2 for EXTHI): Ditto.
            (zero_extendsi<mode>2 for EXTSI): Ditto.
            (*movsi_internal1): Ditto.
            (*mov<mode>_internal1 for QHI): Ditto.
            (movsd_hardfloat): Ditto.
Comment 12 GCC Commits 2022-04-21 21:31:25 UTC
The master branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:748d46cd049c89a799f99f14547267ebae915af6

commit r12-8222-g748d46cd049c89a799f99f14547267ebae915af6
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Thu Apr 21 18:35:32 2022 +0000

    rs6000/testsuite: xfail bswap-brw.c
    
    This testcase does not generate anywhere near optimal code for 32-bit
    code.  For p10 it actually now fails this testcase, after the previous
    patch.  Let's xfail it.
    
    2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
    
    gcc/testsuite/
            PR target/103197
            PR target/102146
            * gcc.target/powerpc/bswap-brw.c: Add xfail on scan-assembler for -m32.
Comment 13 Peter Bergner 2022-05-19 22:13:09 UTC
What's the status of these test cases now, given all of the fizes applied so far?  Can we marked this as FIXED?
Comment 14 Peter Bergner 2022-05-19 23:06:05 UTC
(In reply to Peter Bergner from comment #13)
> What's the status of these test cases now, given all of the fizes applied so
> far?  Can we marked this as FIXED?

Ping.
Comment 15 HaoChen Gui 2022-05-20 00:54:17 UTC
As r12-8128 was revoked, failure of pr56605.c is still not fixed.
Comment 16 GCC Commits 2022-08-16 21:24:11 UTC
The releases/gcc-11 branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:2eb21e7349cda2885438463f045f6729a47039e8

commit r11-10207-g2eb21e7349cda2885438463f045f6729a47039e8
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Sun Jan 2 14:08:35 2022 +0000

    rs6000: Disparage lfiwzx and similar
    
    RA now chooses GEN_OR_VSX_REGS in most cases.  This is great in most
    cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is
    problematic because the integer load and store insns can use cheaper
    addressing modes.  We can fix that by putting a small penalty on the
    instruction alternatives for those.
    
    2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
    
            PR target/103197
            PR target/102146
            * config/rs6000/rs6000.md (zero_extendqi<mode>2 for EXTQI): Disparage
            the "Z" alternatives in {l,st}{f,xs}iwzx.
            (zero_extendhi<mode>2 for EXTHI): Ditto.
            (zero_extendsi<mode>2 for EXTSI): Ditto.
            (*movsi_internal1): Ditto.
            (*mov<mode>_internal1 for QHI): Ditto.
            (movsd_hardfloat): Ditto.
    
    (cherry picked from commit 26fa464f42622c60d6929720dd37143a21054ede)
Comment 17 GCC Commits 2022-08-16 21:24:16 UTC
The releases/gcc-11 branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:72cf56c7cfefaf1b074bb70e42890cf1191c46a1

commit r11-10208-g72cf56c7cfefaf1b074bb70e42890cf1191c46a1
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Thu Apr 21 18:35:32 2022 +0000

    rs6000/testsuite: xfail bswap-brw.c
    
    This testcase does not generate anywhere near optimal code for 32-bit
    code.  For p10 it actually now fails this testcase, after the previous
    patch.  Let's xfail it.
    
    2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
    
    gcc/testsuite/
            PR target/103197
            PR target/102146
            * gcc.target/powerpc/bswap-brw.c: Add xfail on scan-assembler for -m32.
    
    (cherry picked from commit 748d46cd049c89a799f99f14547267ebae915af6)
Comment 18 GCC Commits 2022-08-16 23:35:59 UTC
The releases/gcc-10 branch has been updated by Segher Boessenkool <segher@gcc.gnu.org>:

https://gcc.gnu.org/g:d99d74d8b1b517784e3b05b271b977eb6603121f

commit r10-10948-gd99d74d8b1b517784e3b05b271b977eb6603121f
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Sun Jan 2 14:08:35 2022 +0000

    rs6000: Disparage lfiwzx and similar
    
    RA now chooses GEN_OR_VSX_REGS in most cases.  This is great in most
    cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is
    problematic because the integer load and store insns can use cheaper
    addressing modes.  We can fix that by putting a small penalty on the
    instruction alternatives for those.
    
    2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>
    
            PR target/103197
            PR target/102146
            * config/rs6000/rs6000.md (zero_extendqi<mode>2 for EXTQI): Disparage
            the "Z" alternatives in {l,st}{f,xs}iwzx.
            (zero_extendhi<mode>2 for EXTHI): Ditto.
            (zero_extendsi<mode>2 for EXTSI): Ditto.
            (*movsi_internal1): Ditto.
            (*mov<mode>_internal1 for QHI): Ditto.
            (movsd_hardfloat): Ditto.
    
    (cherry picked from commit 26fa464f42622c60d6929720dd37143a21054ede)
Comment 19 Segher Boessenkool 2022-08-16 23:40:21 UTC
Hi guys,

What testcases are still failing?  I'm a bit lost :-)
Comment 20 HaoChen Gui 2022-08-17 02:20:02 UTC
(In reply to Segher Boessenkool from comment #19)
> Hi guys,
> 
> What testcases are still failing?  I'm a bit lost :-)

pr56605.c is still not fixed.

+FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "\\\\(compare:CC \\\\((?:and|zero_extend):(?:DI) \\\\((?:sub)?reg:[SD]I" 1
Comment 21 Segher Boessenkool 2022-08-24 16:58:48 UTC
Closing as fixed then (pr56605.c still fails on older branches, but that is harmless).
Comment 22 GCC Commits 2023-04-03 03:15:46 UTC
The master branch has been updated by HaoChen Gui <guihaoc@gcc.gnu.org>:

https://gcc.gnu.org/g:0580ea4b7a6dc8ee981b08f936b3ce62c6dfe200

commit r13-6981-g0580ea4b7a6dc8ee981b08f936b3ce62c6dfe200
Author: Haochen Gui <guihaoc@gcc.gnu.org>
Date:   Fri Mar 31 12:51:32 2023 +0800

    rs6000: Modify test case after mode promotion disabled
    
    gcc/testsuite/
            PR target/102146
            * gcc.target/powerpc/pr56605.c: Modify the match pattern for dump
            scan.
Comment 23 Kewen Lin 2023-04-18 01:59:05 UTC
*** Bug 105267 has been marked as a duplicate of this bug. ***