[llvm] ff3f279 - [X86] Regenerate test checks

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 14:13:27 PDT 2022


Author: Nikita Popov
Date: 2022-03-21T22:13:19+01:00
New Revision: ff3f279dac8f450f7f0883fd4e5fb6a9246d0a0a

URL: https://github.com/llvm/llvm-project/commit/ff3f279dac8f450f7f0883fd4e5fb6a9246d0a0a
DIFF: https://github.com/llvm/llvm-project/commit/ff3f279dac8f450f7f0883fd4e5fb6a9246d0a0a.diff

LOG: [X86] Regenerate test checks

Update test checks after the revert in
15336828395792bfc818e6fcd3d951cba1b8477b.

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/add-sub-bool.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/add-sub-bool.ll b/llvm/test/CodeGen/X86/add-sub-bool.ll
index 03c26ba826d24..10e6fb2f4dfd1 100644
--- a/llvm/test/CodeGen/X86/add-sub-bool.ll
+++ b/llvm/test/CodeGen/X86/add-sub-bool.ll
@@ -268,18 +268,28 @@ define i32 @test_i32_sub_sub_idx(i32 %x, i32 %y, i32 %z) nounwind {
 ; X86-LABEL: test_i32_sub_sub_idx:
 ; X86:       # %bb.0:
 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    btl $16, {{[0-9]+}}(%esp)
-; X86-NEXT:    adcl $0, %eax
+; X86-NEXT:    shrl $16, %eax
+; X86-NEXT:    andl $1, %eax
 ; X86-NEXT:    subl {{[0-9]+}}(%esp), %eax
+; X86-NEXT:    addl {{[0-9]+}}(%esp), %eax
 ; X86-NEXT:    retl
 ;
-; X64-LABEL: test_i32_sub_sub_idx:
-; X64:       # %bb.0:
-; X64-NEXT:    movl %edi, %eax
-; X64-NEXT:    btl $16, %edx
-; X64-NEXT:    adcl $0, %eax
-; X64-NEXT:    subl %esi, %eax
-; X64-NEXT:    retq
+; NOTBM-LABEL: test_i32_sub_sub_idx:
+; NOTBM:       # %bb.0:
+; NOTBM-NEXT:    # kill: def $edx killed $edx def $rdx
+; NOTBM-NEXT:    # kill: def $edi killed $edi def $rdi
+; NOTBM-NEXT:    shrl $16, %edx
+; NOTBM-NEXT:    andl $1, %edx
+; NOTBM-NEXT:    subl %esi, %edx
+; NOTBM-NEXT:    leal (%rdx,%rdi), %eax
+; NOTBM-NEXT:    retq
+;
+; TBM-LABEL: test_i32_sub_sub_idx:
+; TBM:       # %bb.0:
+; TBM-NEXT:    bextrl $272, %edx, %eax # imm = 0x110
+; TBM-NEXT:    subl %esi, %eax
+; TBM-NEXT:    addl %edi, %eax
+; TBM-NEXT:    retq
   %shift = lshr i32 %z, 16
   %mask = and i32 %shift, 1
   %sub0 = sub i32 %y, %mask
@@ -324,22 +334,29 @@ define i32 @test_i32_sub_sub_commute_idx(i32 %x, i32 %y, i32 %z) nounwind {
 define i32 @test_i32_sub_sum_idx(i32 %x, i32 %y, i32 %z) nounwind {
 ; X86-LABEL: test_i32_sub_sum_idx:
 ; X86:       # %bb.0:
+; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    addl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    btl $30, {{[0-9]+}}(%esp)
-; X86-NEXT:    sbbl $0, %eax
-; X86-NEXT:    negl %eax
+; X86-NEXT:    shrl $30, %eax
+; X86-NEXT:    andl $1, %eax
+; X86-NEXT:    addl {{[0-9]+}}(%esp), %ecx
+; X86-NEXT:    subl %ecx, %eax
 ; X86-NEXT:    retl
 ;
-; X64-LABEL: test_i32_sub_sum_idx:
-; X64:       # %bb.0:
-; X64-NEXT:    # kill: def $esi killed $esi def $rsi
-; X64-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-NEXT:    leal (%rdi,%rsi), %eax
-; X64-NEXT:    btl $30, %edx
-; X64-NEXT:    sbbl $0, %eax
-; X64-NEXT:    negl %eax
-; X64-NEXT:    retq
+; NOTBM-LABEL: test_i32_sub_sum_idx:
+; NOTBM:       # %bb.0:
+; NOTBM-NEXT:    movl %edx, %eax
+; NOTBM-NEXT:    shrl $30, %eax
+; NOTBM-NEXT:    andl $1, %eax
+; NOTBM-NEXT:    addl %esi, %edi
+; NOTBM-NEXT:    subl %edi, %eax
+; NOTBM-NEXT:    retq
+;
+; TBM-LABEL: test_i32_sub_sum_idx:
+; TBM:       # %bb.0:
+; TBM-NEXT:    bextrl $286, %edx, %eax # imm = 0x11E
+; TBM-NEXT:    addl %esi, %edi
+; TBM-NEXT:    subl %edi, %eax
+; TBM-NEXT:    retq
   %shift = lshr i32 %z, 30
   %mask = and i32 %shift, 1
   %add = add i32 %y, %x
@@ -440,9 +457,11 @@ define i64 @test_i64_add_add_var(i64 %x, i64 %y, i64 %z, i64 %w) nounwind {
 ;
 ; X64-LABEL: test_i64_add_add_var:
 ; X64:       # %bb.0:
-; X64-NEXT:    movq %rdi, %rax
-; X64-NEXT:    btq %rcx, %rdx
-; X64-NEXT:    adcq %rsi, %rax
+; X64-NEXT:    leaq (%rdi,%rsi), %rax
+; X64-NEXT:    # kill: def $cl killed $cl killed $rcx
+; X64-NEXT:    shrq %cl, %rdx
+; X64-NEXT:    andl $1, %edx
+; X64-NEXT:    addq %rdx, %rax
 ; X64-NEXT:    retq
   %add = add i64 %y, %x
   %shift = lshr i64 %z, %w
@@ -541,20 +560,23 @@ define i32 @test_i32_sub_add_var(i32 %x, i32 %y, i32 %z, i32 %w) nounwind {
 define i32 @test_i32_sub_sub_var(i32 %x, i32 %y, i32 %z, i32 %w) nounwind {
 ; X86-LABEL: test_i32_sub_sub_var:
 ; X86:       # %bb.0:
+; X86-NEXT:    movb {{[0-9]+}}(%esp), %cl
 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
-; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
-; X86-NEXT:    btl %ecx, %edx
-; X86-NEXT:    adcl $0, %eax
+; X86-NEXT:    shrl %cl, %eax
+; X86-NEXT:    andl $1, %eax
 ; X86-NEXT:    subl {{[0-9]+}}(%esp), %eax
+; X86-NEXT:    addl {{[0-9]+}}(%esp), %eax
 ; X86-NEXT:    retl
 ;
 ; X64-LABEL: test_i32_sub_sub_var:
 ; X64:       # %bb.0:
-; X64-NEXT:    movl %edi, %eax
-; X64-NEXT:    btl %ecx, %edx
-; X64-NEXT:    adcl $0, %eax
-; X64-NEXT:    subl %esi, %eax
+; X64-NEXT:    # kill: def $edx killed $edx def $rdx
+; X64-NEXT:    # kill: def $edi killed $edi def $rdi
+; X64-NEXT:    # kill: def $cl killed $cl killed $ecx
+; X64-NEXT:    shrl %cl, %edx
+; X64-NEXT:    andl $1, %edx
+; X64-NEXT:    subl %esi, %edx
+; X64-NEXT:    leal (%rdx,%rdi), %eax
 ; X64-NEXT:    retq
   %shift = lshr i32 %z, %w
   %mask = and i32 %shift, 1
@@ -594,23 +616,23 @@ define i32 @test_i32_sub_sub_commute_var(i32 %x, i32 %y, i32 %z, i32 %w) nounwin
 define i32 @test_i32_sub_sum_var(i32 %x, i32 %y, i32 %z, i32 %w) nounwind {
 ; X86-LABEL: test_i32_sub_sum_var:
 ; X86:       # %bb.0:
-; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
+; X86-NEXT:    movb {{[0-9]+}}(%esp), %cl
 ; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    addl {{[0-9]+}}(%esp), %eax
-; X86-NEXT:    btl %ecx, %edx
-; X86-NEXT:    sbbl $0, %eax
-; X86-NEXT:    negl %eax
+; X86-NEXT:    shrl %cl, %eax
+; X86-NEXT:    andl $1, %eax
+; X86-NEXT:    addl {{[0-9]+}}(%esp), %edx
+; X86-NEXT:    subl %edx, %eax
 ; X86-NEXT:    retl
 ;
 ; X64-LABEL: test_i32_sub_sum_var:
 ; X64:       # %bb.0:
-; X64-NEXT:    # kill: def $esi killed $esi def $rsi
-; X64-NEXT:    # kill: def $edi killed $edi def $rdi
-; X64-NEXT:    leal (%rdi,%rsi), %eax
-; X64-NEXT:    btl %ecx, %edx
-; X64-NEXT:    sbbl $0, %eax
-; X64-NEXT:    negl %eax
+; X64-NEXT:    movl %edx, %eax
+; X64-NEXT:    # kill: def $cl killed $cl killed $ecx
+; X64-NEXT:    shrl %cl, %eax
+; X64-NEXT:    andl $1, %eax
+; X64-NEXT:    addl %esi, %edi
+; X64-NEXT:    subl %edi, %eax
 ; X64-NEXT:    retq
   %shift = lshr i32 %z, %w
   %mask = and i32 %shift, 1


        


More information about the llvm-commits mailing list