1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s 3 4 declare void @bar() 5 6 define void @test1(i64 %foo) nounwind { 7 ; CHECK-LABEL: test1: 8 ; CHECK: # %bb.0: 9 ; CHECK-NEXT: btq $32, %rdi 10 ; CHECK-NEXT: jb .LBB0_2 11 ; CHECK-NEXT: # %bb.1: # %if.end 12 ; CHECK-NEXT: retq 13 ; CHECK-NEXT: .LBB0_2: # %if.then 14 ; CHECK-NEXT: jmp bar # TAILCALL 15 %and = and i64 %foo, 4294967296 16 %tobool = icmp eq i64 %and, 0 17 br i1 %tobool, label %if.end, label %if.then 18 19 if.then: 20 tail call void @bar() nounwind 21 br label %if.end 22 23 if.end: 24 ret void 25 } 26 27 define void @test2(i64 %foo) nounwind { 28 ; CHECK-LABEL: test2: 29 ; CHECK: # %bb.0: 30 ; CHECK-NEXT: testl $-2147483648, %edi # imm = 0x80000000 31 ; CHECK-NEXT: jne .LBB1_2 32 ; CHECK-NEXT: # %bb.1: # %if.end 33 ; CHECK-NEXT: retq 34 ; CHECK-NEXT: .LBB1_2: # %if.then 35 ; CHECK-NEXT: jmp bar # TAILCALL 36 %and = and i64 %foo, 2147483648 37 %tobool = icmp eq i64 %and, 0 38 br i1 %tobool, label %if.end, label %if.then 39 40 if.then: 41 tail call void @bar() nounwind 42 br label %if.end 43 44 if.end: 45 ret void 46 } 47