I had these differences when upgrading earlier (with a patched gcc for PR115661): ``` --- a/x86_64-pc-linux-gnu/15/x86_64-pc-linux-gnu.xfail +++ b/x86_64-pc-linux-gnu/15/x86_64-pc-linux-gnu.xfail @@ -438,6 +438,7 @@ FAIL: gcc.dg/nested-vla-1.c (test for excess errors) FAIL: gcc.dg/nested-vla-2.c (test for excess errors) FAIL: gcc.dg/nested-vla-3.c (test for excess errors) FAIL: gcc.dg/packed-vla.c (test for excess errors) +FAIL: gcc.dg/pr10474.c scan-rtl-dump pro_and_epilogue "Performing shrink-wrapping" FAIL: gcc.dg/pr30473.c (test for excess errors) FAIL: gcc.dg/pr34457-1.c (test for excess errors) FAIL: gcc.dg/pr38902.c (test for excess errors) @@ -794,6 +795,7 @@ Running gcc:/gcc/testsuite/gcc.target/i386/i386.exp ... FAIL: gcc.target/i386/cet-sjlj-3.c scan-assembler-times call\t_?longjmp 1 FAIL: gcc.target/i386/cet-sjlj-5.c scan-assembler-times call\t_?longjmp 1 FAIL: gcc.target/i386/fentryname3.c scan-assembler call\t\\*nop@GOTPCREL +FAIL: gcc.target/i386/force-indirect-call-2.c scan-assembler-times (?:call|jmp)[ \\t]+\\*% 3 FAIL: gcc.target/i386/pr101716.c scan-assembler leal[\\t ][^\\n]*eax FAIL: gcc.target/i386/pr101716.c scan-assembler-not movl[\\t ][^\\n]*eax FAIL: gcc.target/i386/pr101950-2.c scan-assembler-times \txor[ql]\t 2 @@ -802,6 +804,8 @@ UNRESOLVED: gcc.target/i386/pr113689-1.c compilation failed to produce executabl FAIL: gcc.target/i386/pr85044.c (test for excess errors) FAIL: gcc.target/i386/pr86722.c scan-assembler-not orpd FAIL: gcc.target/i386/pr86722.c scan-assembler-times (?n)(?:andnpd|andpd|blendvpd) 1 +FAIL: gcc.target/i386/pr91384.c scan-assembler-not testl +FAIL: gcc.target/i386/stack-check-17.c scan-assembler-not pop === gfortran tests === ``` Picking on force-indirect-call-2.c: ``` Executing on host: /tmp/build/gcc/xgcc -B/tmp/build/gcc/ /home/sam/git/gcc/gcc/testsuite/gcc.target/i386/force-indirect-call-2.c -fdiagnostics-plain-output -O2 -mforce-indirect-call -fPIC -ffat-lto-objects -fno-ident -S -o force-indirect-call-2.s (timeout = 300) spawn -ignore SIGHUP /tmp/build/gcc/xgcc -B/tmp/build/gcc/ /home/sam/git/gcc/gcc/testsuite/gcc.target/i386/force-indirect-call-2.c -fdiagnostics-plain-output -O2 -mforce-indirect-call -fPIC -ffat-lto-objects -fno-ident -S -o force-indirect-call-2 gcc.target/i386/force-indirect-call-2.c: (?:call|jmp)[ \\t]+\\*% found 1 times FAIL: gcc.target/i386/force-indirect-call-2.c scan-assembler-times (?:call|jmp)[ \\t]+\\*% 3 ``` I assume r15-1662-g629257bcb81434?
$ diff -u <(gcc-14 /home/sam/git/gcc/gcc/testsuite/gcc.target/i386/force-indirect-call-2.c -fdiagnostics-plain-output -O2 -mforce-indirect-call -fPIC -ffat-lto-objects -fno-ident -S -o -) <(/tmp/build/gcc/xgcc -B/tmp/build/gcc/ /home/sam/git/gcc/gcc/testsuite/gcc.target/i386/force-indirect-call-2.c -fdiagnostics-plain-output -O2 -mforce-indirect-call -fPIC -ffat-lto-objects -fno-ident -S -o -) --- /dev/fd/63 2024-06-27 05:49:53.355792646 +0100 +++ /dev/fd/62 2024-06-27 05:49:53.357792668 +0100 @@ -29,17 +29,14 @@ f2: .LFB2: .cfi_startproc - pushq %rbx + subq $8, %rsp .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - movq f1@GOTPCREL(%rip), %rbx - call *%rbx + call *f1@GOTPCREL(%rip) leaq f3(%rip), %rax call *%rax - movq %rbx, %rax - popq %rbx + addq $8, %rsp .cfi_def_cfa_offset 8 - jmp *%rax + jmp *f1@GOTPCREL(%rip) .cfi_endproc .LFE2: .size f2, .-f2
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655721.html r15-1619-g3b9b8d6cfdf593
That's the bogus got alias set change.
FWIW, I hit it with a revert applied (not just the expand_move fix) to fix it, but I didn't test it very thoroughly. The CI report would've been without any revert.
Still fails with the GOT alias set fix on trunk.
So it likely expects f1@GOTPCREL(%rip) to be CSEd? f2: .LFB2: .cfi_startproc subq $8, %rsp .cfi_def_cfa_offset 16 call *f1@GOTPCREL(%rip) leaq f3(%rip), %rax call *%rax addq $8, %rsp .cfi_def_cfa_offset 8 jmp *f1@GOTPCREL(%rip) indeed with GCC 14 we get f2: .LFB2: .cfi_startproc pushq %rbx .cfi_def_cfa_offset 16 .cfi_offset 3, -16 movq f1@GOTPCREL(%rip), %rbx call *%rbx leaq f3(%rip), %rax call *%rax movq %rbx, %rax popq %rbx .cfi_def_cfa_offset 8 jmp *%rax I think both are perfectly OK for what the testcase should expect, so it's a testism. But I think it's also a missed optimization now.
(In reply to Richard Biener from comment #6) > So it likely expects f1@GOTPCREL(%rip) to be CSEd? > > f2: > .LFB2: > .cfi_startproc > subq $8, %rsp > .cfi_def_cfa_offset 16 > call *f1@GOTPCREL(%rip) This call is not indirect (through the register). > leaq f3(%rip), %rax > call *%rax > addq $8, %rsp > .cfi_def_cfa_offset 8 > jmp *f1@GOTPCREL(%rip) Neither is this sibcall indirect. '-mforce-indirect-call' Force all calls to functions to be indirect. This is useful when using Intel Processor Trace where it generates more precise timing information for function calls.