1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefixes=X86
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefixes=X64
define void @f(i64 %a, i64 %b) nounwind {
; X86-LABEL: f:
; X86: # %bb.0: # %entry
; X86-NEXT: pushl %edi
; X86-NEXT: pushl %esi
; X86-NEXT: movl {{[0-9]+}}(%esp), %esi
; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
; X86-NEXT: movl $-65536, %edi # imm = 0xFFFF0000
; X86-NEXT: cmpl $65527, %eax # imm = 0xFFF7
; X86-NEXT: jne .LBB0_2
; X86-NEXT: # %bb.1: # %if.then
; X86-NEXT: calll ext1@PLT
; X86-NEXT: .LBB0_2: # %if.end
; X86-NEXT: calll ext2@PLT
; X86-NEXT: andl %edi, %esi
; X86-NEXT: cmpl $-589824, %esi # imm = 0xFFF70000
; X86-NEXT: jne .LBB0_3
; X86-NEXT: # %bb.4: # %if.then2
; X86-NEXT: popl %esi
; X86-NEXT: popl %edi
; X86-NEXT: jmp ext1@PLT # TAILCALL
; X86-NEXT: .LBB0_3: # %if.end3
; X86-NEXT: popl %esi
; X86-NEXT: popl %edi
; X86-NEXT: retl
;
; X64-LABEL: f:
; X64: # %bb.0: # %entry
; X64-NEXT: pushq %r14
; X64-NEXT: pushq %rbx
; X64-NEXT: pushq %rax
; X64-NEXT: movq %rsi, %rbx
; X64-NEXT: movabsq $-281474976710656, %r14 # imm = 0xFFFF000000000000
; X64-NEXT: shrq $48, %rdi
; X64-NEXT: cmpl $65527, %edi # imm = 0xFFF7
; X64-NEXT: jne .LBB0_2
; X64-NEXT: # %bb.1: # %if.then
; X64-NEXT: callq ext1@PLT
; X64-NEXT: .LBB0_2: # %if.end
; X64-NEXT: callq ext2@PLT
; X64-NEXT: andq %r14, %rbx
; X64-NEXT: movabsq $-2533274790395904, %rax # imm = 0xFFF7000000000000
; X64-NEXT: addq $8, %rsp
; X64-NEXT: cmpq %rax, %rbx
; X64-NEXT: jne .LBB0_3
; X64-NEXT: # %bb.4: # %if.then2
; X64-NEXT: popq %rbx
; X64-NEXT: popq %r14
; X64-NEXT: jmp ext1@PLT # TAILCALL
; X64-NEXT: .LBB0_3: # %if.end3
; X64-NEXT: popq %rbx
; X64-NEXT: popq %r14
; X64-NEXT: retq
entry:
%shr.mask.i = and i64 %a, -281474976710656
%cmp.i = icmp eq i64 %shr.mask.i, -2533274790395904
br i1 %cmp.i, label %if.then, label %if.end
if.then:
tail call void @ext1()
br label %if.end
if.end:
tail call void @ext2()
%shr.mask.i4 = and i64 %b, -281474976710656
%cmp.i5 = icmp eq i64 %shr.mask.i4, -2533274790395904
br i1 %cmp.i5, label %if.then2, label %if.end3
if.then2:
tail call void @ext1()
br label %if.end3
if.end3:
ret void
}
declare void @ext1()
declare void @ext2()
|