Since the C frontend no longer promotes integer argument smaller than int,
the apx-ndd.c codgen is slightly different:

apx-ndd.s (original)    2024-11-10 06:07:09.894876973 +0800
apx-ndd.s (updated)     2024-11-10 06:06:59.371860565 +0800
@@ -17,7 +17,7 @@ foo_add_char:
 foo1_add_char:
 .LFB1:
        .cfi_startproc
-       leal    (%rsi,%rdi), %eax
+       leal    (%rdi,%rsi), %eax
        ret
        .cfi_endproc
 .LFE1:
@@ -50,7 +50,7 @@ foo_add_short:
 foo1_add_short:
 .LFB4:
        .cfi_startproc
-       leal    (%rsi,%rdi), %eax
+       leal    (%rdi,%rsi), %eax
        ret
        .cfi_endproc
 .LFE4:
@@ -413,7 +413,7 @@ foo_and_char:
 foo1_and_char:
 .LFB37:
        .cfi_startproc
-       andl    %edi, %esi, %eax
+       andl    %esi, %edi, %eax
        ret
        .cfi_endproc
 .LFE37:
@@ -435,7 +435,7 @@ foo_and_short:
 foo1_and_short:
 .LFB39:
        .cfi_startproc
-       andl    %edi, %esi, %eax
+       andl    %esi, %edi, %eax
        ret
        .cfi_endproc
 .LFE39:
@@ -501,7 +501,7 @@ foo_or_char:
 foo1_or_char:
 .LFB45:
        .cfi_startproc
-       orl     %edi, %esi, %eax
+       orl     %esi, %edi, %eax
        ret
        .cfi_endproc
 .LFE45:
@@ -523,7 +523,7 @@ foo_or_short:
 foo1_or_short:
 .LFB47:
        .cfi_startproc
-       orl     %edi, %esi, %eax
+       orl     %esi, %edi, %eax
        ret
        .cfi_endproc
 .LFE47:
@@ -589,7 +589,7 @@ foo_xor_char:
 foo1_xor_char:
 .LFB53:
        .cfi_startproc
-       xorl    %edi, %esi, %eax
+       xorl    %esi, %edi, %eax
        ret
        .cfi_endproc
 .LFE53:
@@ -611,7 +611,7 @@ foo_xor_short:
 foo1_xor_short:
 .LFB55:
        .cfi_startproc
-       xorl    %edi, %esi, %eax
+       xorl    %esi, %edi, %eax
        ret
        .cfi_endproc
 .LFE55:
@@ -1018,7 +1018,7 @@ foo4_rol_uint64_t:
 foo1_imul_short:
 .LFB92:
        .cfi_startproc
-       imull   %edi, %esi, %eax
+       imull   %esi, %edi, %eax
        ret
        .cfi_endproc
 .LFE92:

Adjust the assembler scans.

        PR middle-end/112877
        * gcc.target/i386/apx-ndd.c: Adjusted.

Signed-off-by: H.J. Lu <hjl.to...@gmail.com>
---
 gcc/testsuite/gcc.target/i386/apx-ndd.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/apx-ndd.c 
b/gcc/testsuite/gcc.target/i386/apx-ndd.c
index ce77630a47c..2b2f4fc4b0f 100644
--- a/gcc/testsuite/gcc.target/i386/apx-ndd.c
+++ b/gcc/testsuite/gcc.target/i386/apx-ndd.c
@@ -188,16 +188,13 @@ FOO2 (int64_t, imul, *)
 /* { dg-final { scan-assembler-times "not(?:l|w|q)\[^\n\r]%(?:|r|e)di, 
%(?:|r|e)ax" 4 } } */
 /* { dg-final { scan-assembler-times "andb\[^\n\r]*1, \\(%(?:r|e)di\\), %al" 1 
} } */
 /* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]*1, 
\\(%(?:r|e)di\\), %(?:|r|e)ax" 3 } } */
-/* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]%(?:|r|e)di, 
%(?:|r|e)si, %(?:|r|e)ax" 2 } } */
-/* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]%(?:|r|e)si, 
%(?:|r|e)di, %(?:|r|e)ax" 2 } } */
+/* { dg-final { scan-assembler-times "and(?:l|w|q)\[^\n\r]%(?:|r|e)si, 
%(?:|r|e)di, %(?:|r|e)ax" 4 } } */
 /* { dg-final { scan-assembler-times "orb\[^\n\r]*1, \\(%(?:r|e)di\\), %al" 2} 
} */
 /* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]*1, \\(%(?:r|e)di\\), 
%(?:|r|e)ax" 6 } } */
-/* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]%(?:|r|e)di, 
%(?:|r|e)si, %(?:|r|e)ax" 4 } } */
-/* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]%(?:|r|e)si, 
%(?:|r|e)di, %(?:|r|e)ax" 4 } } */
+/* { dg-final { scan-assembler-times "or(?:l|w|q)\[^\n\r]%(?:|r|e)si, 
%(?:|r|e)di, %(?:|r|e)ax" 8 } } */
 /* { dg-final { scan-assembler-times "xorb\[^\n\r]*1, \\(%(?:r|e)di\\), %al" 1 
} } */
 /* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]*1, 
\\(%(?:r|e)di\\), %(?:|r|e)ax" 3 } } */
-/* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]%(?:|r|e)di, 
%(?:|r|e)si, %(?:|r|e)ax" 2 } } */
-/* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]%(?:|r|e)si, 
%(?:|r|e)di, %(?:|r|e)ax" 2 } } */
+/* { dg-final { scan-assembler-times "xor(?:l|w|q)\[^\n\r]%(?:|r|e)si, 
%(?:|r|e)di, %(?:|r|e)ax" 4 } } */
 /* { dg-final { scan-assembler-times "sal(?:b|l|w|q)\[^\n\r]*1, 
\\(%(?:r|e)di\\), %(?:|r|e)a(?:x|l)" 4 } } */
 /* { dg-final { scan-assembler-times "sal(?:l|w|q)\[^\n\r]*7, %(?:|r|e)di, 
%(?:|r|e)ax" 4 } } */
 /* { dg-final { scan-assembler-times "sar(?:b|l|w|q)\[^\n\r]*1, 
\\(%(?:r|e)di\\), %(?:|r|e)a(?:x|l)" 4 } } */
-- 
2.47.1

Reply via email to