From a9551fb10fb2d4d63964a5d2c1428e751aef5ab5 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 26 Jul 2017 12:49:20 +0000 Subject: [PATCH] [X86] Regenerated BT tests Test on 32/64 bit targets where appropriate llvm-svn: 309107 --- llvm/test/CodeGen/X86/bt.ll | 925 +++++++++++++++++++++++++++++-------------- llvm/test/CodeGen/X86/btq.ll | 25 +- 2 files changed, 646 insertions(+), 304 deletions(-) diff --git a/llvm/test/CodeGen/X86/bt.ll b/llvm/test/CodeGen/X86/bt.ll index 0640581..39465b3 100644 --- a/llvm/test/CodeGen/X86/bt.ll +++ b/llvm/test/CodeGen/X86/bt.ll @@ -1,6 +1,8 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s -; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s +; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64 +; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=X64 + ; PR3253 ; The register+memory form of the BT instruction should be usable on @@ -20,16 +22,27 @@ ; - The and can be commuted. define void @test2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: test2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB0_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB0_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: test2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB0_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB0_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: test2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB0_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB0_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -45,17 +58,29 @@ UnifiedReturnBlock: } define void @test2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: test2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB1_1 -; CHECK-NEXT: # BB#2: # %UnifiedReturnBlock -; CHECK-NEXT: retq -; CHECK-NEXT: .LBB1_1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: retq +; X86-LABEL: test2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB1_1 +; X86-NEXT: # BB#2: # %UnifiedReturnBlock +; X86-NEXT: retl +; X86-NEXT: .LBB1_1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: retl +; +; X64-LABEL: test2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB1_1 +; X64-NEXT: # BB#2: # %UnifiedReturnBlock +; X64-NEXT: retq +; X64-NEXT: .LBB1_1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -71,16 +96,27 @@ UnifiedReturnBlock: } define void @atest2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: atest2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB2_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB2_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: atest2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB2_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB2_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: atest2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB2_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB2_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -96,17 +132,29 @@ UnifiedReturnBlock: } define void @atest2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: atest2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB3_1 -; CHECK-NEXT: # BB#2: # %UnifiedReturnBlock -; CHECK-NEXT: retq -; CHECK-NEXT: .LBB3_1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: retq +; X86-LABEL: atest2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB3_1 +; X86-NEXT: # BB#2: # %UnifiedReturnBlock +; X86-NEXT: retl +; X86-NEXT: .LBB3_1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: retl +; +; X64-LABEL: atest2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB3_1 +; X64-NEXT: # BB#2: # %UnifiedReturnBlock +; X64-NEXT: retq +; X64-NEXT: .LBB3_1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -122,17 +170,29 @@ UnifiedReturnBlock: } define void @test3(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: test3: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB4_1 -; CHECK-NEXT: # BB#2: # %UnifiedReturnBlock -; CHECK-NEXT: retq -; CHECK-NEXT: .LBB4_1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: retq +; X86-LABEL: test3: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB4_1 +; X86-NEXT: # BB#2: # %UnifiedReturnBlock +; X86-NEXT: retl +; X86-NEXT: .LBB4_1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: retl +; +; X64-LABEL: test3: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB4_1 +; X64-NEXT: # BB#2: # %UnifiedReturnBlock +; X64-NEXT: retq +; X64-NEXT: .LBB4_1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %tmp29, %x @@ -148,17 +208,29 @@ UnifiedReturnBlock: } define void @test3b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: test3b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB5_1 -; CHECK-NEXT: # BB#2: # %UnifiedReturnBlock -; CHECK-NEXT: retq -; CHECK-NEXT: .LBB5_1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: retq +; X86-LABEL: test3b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB5_1 +; X86-NEXT: # BB#2: # %UnifiedReturnBlock +; X86-NEXT: retl +; X86-NEXT: .LBB5_1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: retl +; +; X64-LABEL: test3b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB5_1 +; X64-NEXT: # BB#2: # %UnifiedReturnBlock +; X64-NEXT: retq +; X64-NEXT: .LBB5_1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %x, %tmp29 @@ -174,16 +246,27 @@ UnifiedReturnBlock: } define void @testne2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: testne2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB6_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB6_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: testne2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB6_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB6_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: testne2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB6_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB6_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -199,16 +282,27 @@ UnifiedReturnBlock: } define void @testne2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: testne2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB7_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB7_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: testne2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB7_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB7_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: testne2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB7_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB7_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -224,16 +318,27 @@ UnifiedReturnBlock: } define void @atestne2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: atestne2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB8_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB8_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: atestne2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB8_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB8_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: atestne2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB8_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB8_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -249,16 +354,27 @@ UnifiedReturnBlock: } define void @atestne2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: atestne2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB9_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB9_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: atestne2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB9_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB9_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: atestne2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB9_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB9_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -274,16 +390,27 @@ UnifiedReturnBlock: } define void @testne3(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: testne3: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB10_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB10_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: testne3: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB10_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB10_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: testne3: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB10_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB10_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %tmp29, %x @@ -299,16 +426,27 @@ UnifiedReturnBlock: } define void @testne3b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: testne3b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB11_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB11_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: testne3b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB11_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB11_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: testne3b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB11_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB11_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %x, %tmp29 @@ -324,16 +462,27 @@ UnifiedReturnBlock: } define void @query2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: query2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB12_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB12_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: query2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB12_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB12_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: query2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB12_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB12_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -349,16 +498,27 @@ UnifiedReturnBlock: } define void @query2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: query2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB13_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB13_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: query2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB13_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB13_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: query2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB13_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB13_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -374,16 +534,27 @@ UnifiedReturnBlock: } define void @aquery2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: aquery2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB14_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB14_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: aquery2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB14_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB14_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: aquery2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB14_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB14_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -399,16 +570,27 @@ UnifiedReturnBlock: } define void @aquery2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: aquery2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB15_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB15_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: aquery2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB15_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB15_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: aquery2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB15_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB15_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -424,16 +606,27 @@ UnifiedReturnBlock: } define void @query3(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: query3: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB16_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB16_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: query3: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB16_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB16_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: query3: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB16_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB16_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %tmp29, %x @@ -449,16 +642,27 @@ UnifiedReturnBlock: } define void @query3b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: query3b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB17_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB17_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: query3b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB17_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB17_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: query3b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB17_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB17_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %x, %tmp29 @@ -474,16 +678,27 @@ UnifiedReturnBlock: } define void @query3x(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: query3x: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB18_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB18_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: query3x: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB18_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB18_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: query3x: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB18_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB18_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %tmp29, %x @@ -499,16 +714,27 @@ UnifiedReturnBlock: } define void @query3bx(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: query3bx: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jae .LBB19_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB19_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: query3bx: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jae .LBB19_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB19_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: query3bx: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jae .LBB19_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB19_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %x, %tmp29 @@ -524,16 +750,27 @@ UnifiedReturnBlock: } define void @queryne2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: queryne2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB20_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB20_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: queryne2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB20_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB20_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: queryne2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB20_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB20_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -549,16 +786,27 @@ UnifiedReturnBlock: } define void @queryne2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: queryne2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB21_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB21_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: queryne2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB21_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB21_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: queryne2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB21_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB21_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = lshr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -574,16 +822,27 @@ UnifiedReturnBlock: } define void @aqueryne2(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: aqueryne2: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB22_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB22_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: aqueryne2: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB22_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB22_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: aqueryne2: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB22_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB22_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 %tmp29, 1 @@ -599,16 +858,27 @@ UnifiedReturnBlock: } define void @aqueryne2b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: aqueryne2b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB23_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB23_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: aqueryne2b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB23_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB23_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: aqueryne2b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB23_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB23_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = ashr i32 %x, %n %tmp3 = and i32 1, %tmp29 @@ -624,16 +894,27 @@ UnifiedReturnBlock: } define void @queryne3(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: queryne3: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB24_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB24_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: queryne3: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB24_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB24_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: queryne3: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB24_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB24_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %tmp29, %x @@ -649,16 +930,27 @@ UnifiedReturnBlock: } define void @queryne3b(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: queryne3b: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB25_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB25_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: queryne3b: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB25_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB25_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: queryne3b: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB25_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB25_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %x, %tmp29 @@ -674,16 +966,27 @@ UnifiedReturnBlock: } define void @queryne3x(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: queryne3x: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB26_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB26_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: queryne3x: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB26_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB26_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: queryne3x: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB26_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB26_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %tmp29, %x @@ -699,16 +1002,27 @@ UnifiedReturnBlock: } define void @queryne3bx(i32 %x, i32 %n) nounwind { -; CHECK-LABEL: queryne3bx: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: jb .LBB27_2 -; CHECK-NEXT: # BB#1: # %bb -; CHECK-NEXT: pushq %rax -; CHECK-NEXT: callq foo -; CHECK-NEXT: popq %rax -; CHECK-NEXT: .LBB27_2: # %UnifiedReturnBlock -; CHECK-NEXT: retq +; X86-LABEL: queryne3bx: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: jb .LBB27_2 +; X86-NEXT: # BB#1: # %bb +; X86-NEXT: calll foo +; X86-NEXT: .LBB27_2: # %UnifiedReturnBlock +; X86-NEXT: retl +; +; X64-LABEL: queryne3bx: +; X64: # BB#0: # %entry +; X64-NEXT: btl %esi, %edi +; X64-NEXT: jb .LBB27_2 +; X64-NEXT: # BB#1: # %bb +; X64-NEXT: pushq %rax +; X64-NEXT: callq foo +; X64-NEXT: popq %rax +; X64-NEXT: .LBB27_2: # %UnifiedReturnBlock +; X64-NEXT: retq entry: %tmp29 = shl i32 1, %n %tmp3 = and i32 %x, %tmp29 @@ -726,12 +1040,21 @@ UnifiedReturnBlock: declare void @foo() define zeroext i1 @invert(i32 %flags, i32 %flag) nounwind { -; CHECK-LABEL: invert: -; CHECK: # BB#0: -; CHECK-NEXT: notl %edi -; CHECK-NEXT: btl %esi, %edi -; CHECK-NEXT: setb %al -; CHECK-NEXT: retq +; X86-LABEL: invert: +; X86: # BB#0: +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: notl %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %ecx, %eax +; X86-NEXT: setb %al +; X86-NEXT: retl +; +; X64-LABEL: invert: +; X64: # BB#0: +; X64-NEXT: notl %edi +; X64-NEXT: btl %esi, %edi +; X64-NEXT: setb %al +; X64-NEXT: retq %neg = xor i32 %flags, -1 %shl = shl i32 1, %flag %and = and i32 %shl, %neg @@ -740,11 +1063,19 @@ define zeroext i1 @invert(i32 %flags, i32 %flag) nounwind { } define zeroext i1 @extend(i32 %bit, i64 %bits) { -; CHECK-LABEL: extend: -; CHECK: # BB#0: # %entry -; CHECK-NEXT: btl %edi, %esi -; CHECK-NEXT: setb %al -; CHECK-NEXT: retq +; X86-LABEL: extend: +; X86: # BB#0: # %entry +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx +; X86-NEXT: btl %eax, %ecx +; X86-NEXT: setb %al +; X86-NEXT: retl +; +; X64-LABEL: extend: +; X64: # BB#0: # %entry +; X64-NEXT: btl %edi, %esi +; X64-NEXT: setb %al +; X64-NEXT: retq entry: %and = and i32 %bit, 31 %sh_prom = zext i32 %and to i64 diff --git a/llvm/test/CodeGen/X86/btq.ll b/llvm/test/CodeGen/X86/btq.ll index add6576..fc015d5 100644 --- a/llvm/test/CodeGen/X86/btq.ll +++ b/llvm/test/CodeGen/X86/btq.ll @@ -1,15 +1,21 @@ -; RUN: llc < %s -march=x86-64 | FileCheck %s +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s declare void @bar() define void @test1(i64 %foo) nounwind { +; CHECK-LABEL: test1: +; CHECK: # BB#0: +; CHECK-NEXT: btq $32, %rdi +; CHECK-NEXT: jb .LBB0_2 +; CHECK-NEXT: # BB#1: # %if.end +; CHECK-NEXT: retq +; CHECK-NEXT: .LBB0_2: # %if.then +; CHECK-NEXT: jmp bar # TAILCALL %and = and i64 %foo, 4294967296 %tobool = icmp eq i64 %and, 0 br i1 %tobool, label %if.end, label %if.then -; CHECK-LABEL: test1: -; CHECK: btq $32 - if.then: tail call void @bar() nounwind br label %if.end @@ -19,13 +25,18 @@ if.end: } define void @test2(i64 %foo) nounwind { +; CHECK-LABEL: test2: +; CHECK: # BB#0: +; CHECK-NEXT: testl $-2147483648, %edi # imm = 0x80000000 +; CHECK-NEXT: jne .LBB1_2 +; CHECK-NEXT: # BB#1: # %if.end +; CHECK-NEXT: retq +; CHECK-NEXT: .LBB1_2: # %if.then +; CHECK-NEXT: jmp bar # TAILCALL %and = and i64 %foo, 2147483648 %tobool = icmp eq i64 %and, 0 br i1 %tobool, label %if.end, label %if.then -; CHECK-LABEL: test2: -; CHECK: testl $-2147483648 - if.then: tail call void @bar() nounwind br label %if.end -- 2.7.4