]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
x86: Swap %edx/%rdx with %eax/%rax for PR middle-end/122122
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 7 Oct 2025 00:28:04 +0000 (08:28 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 7 Oct 2025 00:33:16 +0000 (08:33 +0800)
Swap %edx/%rdx with %eax/%rax after

commit r16-4255-g075310d3a3ef1a8b483b62d9535887b37f291ee4
Author: Jan Hubicka <hubicka@ucw.cz>
Date:   Mon Oct 6 21:35:22 2025 +0200

    Update profile in tree-ssa-dce

commit 8498ef3d0758012bf3e355a61a0f89aff7513851
Author: Jan Hubicka <hubicka@ucw.cz>
Date:   Wed Oct 1 16:56:15 2025 +0200

    Improve profile update in merge_blocks

PR middle-end/122122
* gcc.target/i386/memcpy-pr120683-2.c: Swap %edx/%rdx with
%eax/%rax after
* gcc.target/i386/memcpy-pr120683-3.c: Likewise.
* gcc.target/i386/memcpy-pr120683-4.c: Likewise.
* gcc.target/i386/memcpy-pr120683-5.c: Likewise.
* gcc.target/i386/memcpy-pr120683-6.c: Likewise.
* gcc.target/i386/memcpy-pr120683-7.c: Likewise.
* gcc.target/i386/pr111657-1.c: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c
gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c
gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c
gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c
gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c
gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c
gcc/testsuite/gcc.target/i386/pr111657-1.c

index 0d0e34860e91552282dc4647d0cef860e9467d36..cd78ae860b6b6cd6ffab4fcd1ab95e08ab103458 100644 (file)
@@ -7,22 +7,22 @@
 **foo:
 **.LFB[0-9]+:
 **     .cfi_startproc
-**     xorl    %edx, %edx
+**     xorl    %eax, %eax
 **.L[0-9]+:
-**     movl    %edx, %eax
-**     addl    \$64, %edx
-**     movdqa  src\(%rax\), %xmm3
-**     movdqa  src\+16\(%rax\), %xmm2
-**     movdqa  src\+32\(%rax\), %xmm1
-**     movdqa  src\+48\(%rax\), %xmm0
-**     movaps  %xmm3, dest\(%rax\)
-**     movaps  %xmm2, dest\+16\(%rax\)
-**     movaps  %xmm1, dest\+32\(%rax\)
-**     movaps  %xmm0, dest\+48\(%rax\)
-**     cmpl    \$256, %edx
+**     movl    %eax, %edx
+**     addl    \$64, %eax
+**     movdqa  src\(%rdx\), %xmm3
+**     movdqa  src\+16\(%rdx\), %xmm2
+**     movdqa  src\+32\(%rdx\), %xmm1
+**     movdqa  src\+48\(%rdx\), %xmm0
+**     movaps  %xmm3, dest\(%rdx\)
+**     movaps  %xmm2, dest\+16\(%rdx\)
+**     movaps  %xmm1, dest\+32\(%rdx\)
+**     movaps  %xmm0, dest\+48\(%rdx\)
+**     cmpl    \$256, %eax
 **     jb      .L[0-9]+
-**     movdqa  src\(%rdx\), %xmm0
-**     movaps  %xmm0, dest\(%rdx\)
+**     movdqa  src\(%rax\), %xmm0
+**     movaps  %xmm0, dest\(%rax\)
 **     ret
 **...
 */
index e5aca32a5880772eb12f492fde40e9285f157c64..ea3bcca610398fe06824da35fbab40da92a19f9e 100644 (file)
@@ -7,24 +7,24 @@
 **foo:
 **.LFB[0-9]+:
 **     .cfi_startproc
-**     xorl    %edx, %edx
+**     xorl    %eax, %eax
 **.L[0-9]+:
-**     movl    %edx, %eax
-**     addl    \$64, %edx
-**     movdqa  src\(%rax\), %xmm3
-**     movdqa  src\+16\(%rax\), %xmm2
-**     movdqa  src\+32\(%rax\), %xmm1
-**     movdqa  src\+48\(%rax\), %xmm0
-**     movaps  %xmm3, dest\(%rax\)
-**     movaps  %xmm2, dest\+16\(%rax\)
-**     movaps  %xmm1, dest\+32\(%rax\)
-**     movaps  %xmm0, dest\+48\(%rax\)
-**     cmpl    \$256, %edx
+**     movl    %eax, %edx
+**     addl    \$64, %eax
+**     movdqa  src\(%rdx\), %xmm3
+**     movdqa  src\+16\(%rdx\), %xmm2
+**     movdqa  src\+32\(%rdx\), %xmm1
+**     movdqa  src\+48\(%rdx\), %xmm0
+**     movaps  %xmm3, dest\(%rdx\)
+**     movaps  %xmm2, dest\+16\(%rdx\)
+**     movaps  %xmm1, dest\+32\(%rdx\)
+**     movaps  %xmm0, dest\+48\(%rdx\)
+**     cmpl    \$256, %eax
 **     jb      .L[0-9]+
-**     movdqa  src\(%rdx\), %xmm0
-**     movaps  %xmm0, dest\(%rdx\)
-**     movdqu  src\+15\(%rdx\), %xmm0
-**     movups  %xmm0, dest\+15\(%rdx\)
+**     movdqa  src\(%rax\), %xmm0
+**     movaps  %xmm0, dest\(%rax\)
+**     movdqu  src\+15\(%rax\), %xmm0
+**     movups  %xmm0, dest\+15\(%rax\)
 **     ret
 **...
 */
index 27f7bedc7037d84ae106a57bd376f8450caf3f00..c2d595f877dc1af8f50b0d296dbbd4dbfcc91791 100644 (file)
@@ -7,22 +7,22 @@
 **foo:
 **.LFB[0-9]+:
 **     .cfi_startproc
-**     xorl    %edx, %edx
+**     xorl    %eax, %eax
 **.L[0-9]+:
-**     movl    %edx, %eax
-**     subl    \$-128, %edx
-**     vmovdqa src\(%rax\), %ymm3
-**     vmovdqa src\+32\(%rax\), %ymm2
-**     vmovdqa src\+64\(%rax\), %ymm1
-**     vmovdqa src\+96\(%rax\), %ymm0
-**     vmovdqa %ymm3, dest\(%rax\)
-**     vmovdqa %ymm2, dest\+32\(%rax\)
-**     vmovdqa %ymm1, dest\+64\(%rax\)
-**     vmovdqa %ymm0, dest\+96\(%rax\)
-**     cmpl    \$512, %edx
+**     movl    %eax, %edx
+**     subl    \$-128, %eax
+**     vmovdqa src\(%rdx\), %ymm3
+**     vmovdqa src\+32\(%rdx\), %ymm2
+**     vmovdqa src\+64\(%rdx\), %ymm1
+**     vmovdqa src\+96\(%rdx\), %ymm0
+**     vmovdqa %ymm3, dest\(%rdx\)
+**     vmovdqa %ymm2, dest\+32\(%rdx\)
+**     vmovdqa %ymm1, dest\+64\(%rdx\)
+**     vmovdqa %ymm0, dest\+96\(%rdx\)
+**     cmpl    \$512, %eax
 **     jb      .L[0-9]+
-**     vmovdqa src\(%rdx\), %ymm0
-**     vmovdqa %ymm0, dest\(%rdx\)
+**     vmovdqa src\(%rax\), %ymm0
+**     vmovdqa %ymm0, dest\(%rax\)
 **     vzeroupper
 **     ret
 **...
index 34a74080f21a9a31ff6921a3ee7e8288b0d3aa6f..294d25c53e6dccb6d29746ace8e4c19fe8ff9d0c 100644 (file)
@@ -7,24 +7,24 @@
 **foo:
 **.LFB[0-9]+:
 **     .cfi_startproc
-**     xorl    %edx, %edx
+**     xorl    %eax, %eax
 **.L[0-9]+:
-**     movl    %edx, %eax
-**     subl    \$-128, %edx
-**     vmovdqa src\(%rax\), %ymm3
-**     vmovdqa src\+32\(%rax\), %ymm2
-**     vmovdqa src\+64\(%rax\), %ymm1
-**     vmovdqa src\+96\(%rax\), %ymm0
-**     vmovdqa %ymm3, dest\(%rax\)
-**     vmovdqa %ymm2, dest\+32\(%rax\)
-**     vmovdqa %ymm1, dest\+64\(%rax\)
-**     vmovdqa %ymm0, dest\+96\(%rax\)
-**     cmpl    \$512, %edx
+**     movl    %eax, %edx
+**     subl    \$-128, %eax
+**     vmovdqa src\(%rdx\), %ymm3
+**     vmovdqa src\+32\(%rdx\), %ymm2
+**     vmovdqa src\+64\(%rdx\), %ymm1
+**     vmovdqa src\+96\(%rdx\), %ymm0
+**     vmovdqa %ymm3, dest\(%rdx\)
+**     vmovdqa %ymm2, dest\+32\(%rdx\)
+**     vmovdqa %ymm1, dest\+64\(%rdx\)
+**     vmovdqa %ymm0, dest\+96\(%rdx\)
+**     cmpl    \$512, %eax
 **     jb      .L[0-9]+
-**     vmovdqa src\(%rdx\), %ymm0
-**     vmovdqa %ymm0, dest\(%rdx\)
-**     vmovdqu src\+31\(%rdx\), %ymm0
-**     vmovdqu %ymm0, dest\+31\(%rdx\)
+**     vmovdqa src\(%rax\), %ymm0
+**     vmovdqa %ymm0, dest\(%rax\)
+**     vmovdqu src\+31\(%rax\), %ymm0
+**     vmovdqu %ymm0, dest\+31\(%rax\)
 **     vzeroupper
 **     ret
 **...
index aa5d90d62e4b539bf65e2bc0860f68b792d59d8e..2013916f7b2b8ea3c73b3fd0c6350571eeb8f505 100644 (file)
@@ -7,22 +7,22 @@
 **foo:
 **.LFB[0-9]+:
 **     .cfi_startproc
-**     xorl    %edx, %edx
+**     xorl    %eax, %eax
 **.L[0-9]+:
-**     movl    %edx, %eax
-**     addl    \$256, %edx
-**     vmovdqa64       src\(%rax\), %zmm3
-**     vmovdqa64       src\+64\(%rax\), %zmm2
-**     vmovdqa64       src\+128\(%rax\), %zmm1
-**     vmovdqa64       src\+192\(%rax\), %zmm0
-**     vmovdqa64       %zmm3, dest\(%rax\)
-**     vmovdqa64       %zmm2, dest\+64\(%rax\)
-**     vmovdqa64       %zmm1, dest\+128\(%rax\)
-**     vmovdqa64       %zmm0, dest\+192\(%rax\)
-**     cmpl    \$1024, %edx
+**     movl    %eax, %edx
+**     addl    \$256, %eax
+**     vmovdqa64       src\(%rdx\), %zmm3
+**     vmovdqa64       src\+64\(%rdx\), %zmm2
+**     vmovdqa64       src\+128\(%rdx\), %zmm1
+**     vmovdqa64       src\+192\(%rdx\), %zmm0
+**     vmovdqa64       %zmm3, dest\(%rdx\)
+**     vmovdqa64       %zmm2, dest\+64\(%rdx\)
+**     vmovdqa64       %zmm1, dest\+128\(%rdx\)
+**     vmovdqa64       %zmm0, dest\+192\(%rdx\)
+**     cmpl    \$1024, %eax
 **     jb      .L[0-9]+
-**     vmovdqa64       src\(%rdx\), %zmm0
-**     vmovdqa64       %zmm0, dest\(%rdx\)
+**     vmovdqa64       src\(%rax\), %zmm0
+**     vmovdqa64       %zmm0, dest\(%rax\)
 **     vzeroupper
 **     ret
 **...
index 63d8a1521a1600aa2dd46c6004b526835f122c17..30e2c3c6bef0fc304e8f736754858eb88f54afd9 100644 (file)
@@ -7,24 +7,24 @@
 **foo:
 **.LFB[0-9]+:
 **     .cfi_startproc
-**     xorl    %edx, %edx
+**     xorl    %eax, %eax
 **.L[0-9]+:
-**     movl    %edx, %eax
-**     addl    \$256, %edx
-**     vmovdqa64       src\(%rax\), %zmm3
-**     vmovdqa64       src\+64\(%rax\), %zmm2
-**     vmovdqa64       src\+128\(%rax\), %zmm1
-**     vmovdqa64       src\+192\(%rax\), %zmm0
-**     vmovdqa64       %zmm3, dest\(%rax\)
-**     vmovdqa64       %zmm2, dest\+64\(%rax\)
-**     vmovdqa64       %zmm1, dest\+128\(%rax\)
-**     vmovdqa64       %zmm0, dest\+192\(%rax\)
-**     cmpl    \$1024, %edx
+**     movl    %eax, %edx
+**     addl    \$256, %eax
+**     vmovdqa64       src\(%rdx\), %zmm3
+**     vmovdqa64       src\+64\(%rdx\), %zmm2
+**     vmovdqa64       src\+128\(%rdx\), %zmm1
+**     vmovdqa64       src\+192\(%rdx\), %zmm0
+**     vmovdqa64       %zmm3, dest\(%rdx\)
+**     vmovdqa64       %zmm2, dest\+64\(%rdx\)
+**     vmovdqa64       %zmm1, dest\+128\(%rdx\)
+**     vmovdqa64       %zmm0, dest\+192\(%rdx\)
+**     cmpl    \$1024, %eax
 **     jb      .L[0-9]+
-**     vmovdqa src\(%rdx\), %ymm0
-**     vmovdqa %ymm0, dest\(%rdx\)
-**     vmovdqu src\+31\(%rdx\), %ymm0
-**     vmovdqu %ymm0, dest\+31\(%rdx\)
+**     vmovdqa src\(%rax\), %ymm0
+**     vmovdqa %ymm0, dest\(%rax\)
+**     vmovdqu src\+31\(%rax\), %ymm0
+**     vmovdqu %ymm0, dest\+31\(%rax\)
 **     vzeroupper
 **     ret
 **...
index fa9f4cfe5c531547973afed987e3a7be0d689073..bb37e95a39b25994a58ab5aa4c301cd6e474d2e3 100644 (file)
@@ -7,17 +7,17 @@
 **bar:
 **...
 **.L[0-9]+:
-**     movl    %edx, %eax
-**     addl    \$32, %edx
-**     movq    %gs:m\(%rax\), %r9
-**     movq    %gs:m\+8\(%rax\), %r8
-**     movq    %gs:m\+16\(%rax\), %rsi
-**     movq    %gs:m\+24\(%rax\), %rcx
-**     movq    %r9, \(%rdi,%rax\)
-**     movq    %r8, 8\(%rdi,%rax\)
-**     movq    %rsi, 16\(%rdi,%rax\)
-**     movq    %rcx, 24\(%rdi,%rax\)
-**     cmpl    \$224, %edx
+**     movl    %eax, %edx
+**     addl    \$32, %eax
+**     movq    %gs:m\(%rdx\), %r9
+**     movq    %gs:m\+8\(%rdx\), %r8
+**     movq    %gs:m\+16\(%rdx\), %rsi
+**     movq    %gs:m\+24\(%rdx\), %rcx
+**     movq    %r9, \(%rdi,%rdx\)
+**     movq    %r8, 8\(%rdi,%rdx\)
+**     movq    %rsi, 16\(%rdi,%rdx\)
+**     movq    %rcx, 24\(%rdi,%rdx\)
+**     cmpl    \$224, %eax
 **     jb      .L[0-9]+
 **...
 */