1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s -check-prefix=X32
3 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s -check-prefix=X64
6 define i32 @t(i32 %a, i32 %b) nounwind ssp {
8 ; X32: # %bb.0: # %entry
9 ; X32-NEXT: movb {{[0-9]+}}(%esp), %al
10 ; X32-NEXT: xorb {{[0-9]+}}(%esp), %al
11 ; X32-NEXT: testb $64, %al
12 ; X32-NEXT: je .LBB0_1
13 ; X32-NEXT: # %bb.2: # %bb1
14 ; X32-NEXT: jmp bar # TAILCALL
15 ; X32-NEXT: .LBB0_1: # %bb
16 ; X32-NEXT: jmp foo # TAILCALL
19 ; X64: # %bb.0: # %entry
20 ; X64-NEXT: xorl %esi, %edi
21 ; X64-NEXT: xorl %eax, %eax
22 ; X64-NEXT: testl $16384, %edi # imm = 0x4000
23 ; X64-NEXT: je .LBB0_1
24 ; X64-NEXT: # %bb.2: # %bb1
25 ; X64-NEXT: jmp bar # TAILCALL
26 ; X64-NEXT: .LBB0_1: # %bb
27 ; X64-NEXT: jmp foo # TAILCALL
29 %0 = and i32 %a, 16384
30 %1 = icmp ne i32 %0, 0
31 %2 = and i32 %b, 16384
32 %3 = icmp ne i32 %2, 0
34 br i1 %4, label %bb1, label %bb
37 %5 = tail call i32 (...) @foo() nounwind ; <i32> [#uses=1]
41 %6 = tail call i32 (...) @bar() nounwind ; <i32> [#uses=1]
49 define i32 @t2(i32 %x, i32 %y) nounwind ssp {
51 ; X32: # %bb.0: # %entry
52 ; X32-NEXT: cmpl $0, {{[0-9]+}}(%esp)
54 ; X32-NEXT: cmpl $0, {{[0-9]+}}(%esp)
56 ; X32-NEXT: cmpb %al, %cl
57 ; X32-NEXT: je .LBB1_1
58 ; X32-NEXT: # %bb.2: # %bb
59 ; X32-NEXT: jmp foo # TAILCALL
60 ; X32-NEXT: .LBB1_1: # %return
64 ; X64: # %bb.0: # %entry
65 ; X64-NEXT: testl %edi, %edi
67 ; X64-NEXT: testl %esi, %esi
69 ; X64-NEXT: cmpb %al, %cl
70 ; X64-NEXT: je .LBB1_1
71 ; X64-NEXT: # %bb.2: # %bb
72 ; X64-NEXT: xorl %eax, %eax
73 ; X64-NEXT: jmp foo # TAILCALL
74 ; X64-NEXT: .LBB1_1: # %return
78 %0 = icmp eq i32 %x, 0 ; <i1> [#uses=1]
79 %1 = icmp eq i32 %y, 0 ; <i1> [#uses=1]
80 %2 = xor i1 %1, %0 ; <i1> [#uses=1]
81 br i1 %2, label %bb, label %return
84 %3 = tail call i32 (...) @foo() nounwind ; <i32> [#uses=0]
87 return: ; preds = %entry