https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61810
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Re-running the experiment of disabling init-regs on x86_64 on trunk shows
+FAIL: gcc.dg/lto/pr48622 c_lto_pr48622_0.o-c_lto_pr48622_0.o link, -O -flto
-fi
nline-small-functions -fno-early-inlining
FAIL: gcc.dg/tree-prof/20050826-2.c scan-tree-dump-not dom2 "Invalid sum"
+FAIL: gcc.target/i386/extract-insert-combining.c scan-assembler-times
(?:vmovd|
movd)[ \\\\t]+[^{\\n]*%xmm[0-9] 3
+FAIL: gcc.target/i386/extract-insert-combining.c scan-assembler-times
(?:vpinsr
d|pinsrd)[ \\\\t]+[^{\\n]*%xmm[0-9] 1
+FAIL: gnat.dg/sso8.adb execution test
with both -m64 and -m32
The gcc.dg/lto/pr48622 failure is a link-fail:
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld:
/tmp/cc8guozm.ltrans0.ltrans.o: in function `main':^M
<artificial>:(.text+0x18): undefined reference to `ashift_qi_1'^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1
I think the testcase is broken - with initregs likely the
int
main ()
{
if (ashift_qi_0 (0xff) != (u8) ((u8) 0xff << 0))
abort ();
test directly resolved to abort (), leaving the rest of the code dead.
The gcc.target/i386/extract-insert-combining.c looks like a combine
missed optimization when facing uninitialized regs compared to all-zero.
We get
pinsrd $0, %esi, %xmm0
pinsrd $0, %edi, %xmm1
movl %esi, -12(%rsp)
paddd %xmm0, %xmm1
pinsrd $0, %esi, %xmm0
paddd %xmm1, %xmm0
movd %xmm0, %eax
ret
preserving the "uninitialized" state of %xmm0 high, when initregs
explicitely zeros %xmm0 then this is matched to movd.
I cannot assess what goes wrong with gnat.dg/sso8.adb, but it might be
a testsuite bug as well.