~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/CodeGen/X86/memcmp.ll

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc %s -o - -march=x86-64 | FileCheck %s
 
2
 
 
3
; This tests codegen time inlining/optimization of memcmp
 
4
; rdar://6480398
 
5
 
 
6
@.str = private constant [23 x i8] c"fooooooooooooooooooooo\00", align 1 ; <[23 x i8]*> [#uses=1]
 
7
 
 
8
declare i32 @memcmp(...)
 
9
 
 
10
define void @memcmp2(i8* %X, i8* %Y, i32* nocapture %P) nounwind {
 
11
entry:
 
12
  %0 = tail call i32 (...)* @memcmp(i8* %X, i8* %Y, i32 2) nounwind ; <i32> [#uses=1]
 
13
  %1 = icmp eq i32 %0, 0                          ; <i1> [#uses=1]
 
14
  br i1 %1, label %return, label %bb
 
15
 
 
16
bb:                                               ; preds = %entry
 
17
  store i32 4, i32* %P, align 4
 
18
  ret void
 
19
 
 
20
return:                                           ; preds = %entry
 
21
  ret void
 
22
; CHECK: memcmp2:
 
23
; CHECK: movw    (%rsi), %ax
 
24
; CHECK: cmpw    %ax, (%rdi)
 
25
}
 
26
 
 
27
define void @memcmp2a(i8* %X, i32* nocapture %P) nounwind {
 
28
entry:
 
29
  %0 = tail call i32 (...)* @memcmp(i8* %X, i8* getelementptr inbounds ([23 x i8]* @.str, i32 0, i32 1), i32 2) nounwind ; <i32> [#uses=1]
 
30
  %1 = icmp eq i32 %0, 0                          ; <i1> [#uses=1]
 
31
  br i1 %1, label %return, label %bb
 
32
 
 
33
bb:                                               ; preds = %entry
 
34
  store i32 4, i32* %P, align 4
 
35
  ret void
 
36
 
 
37
return:                                           ; preds = %entry
 
38
  ret void
 
39
; CHECK: memcmp2a:
 
40
; CHECK: cmpw    $28527, (%rdi)
 
41
}
 
42
 
 
43
 
 
44
define void @memcmp4(i8* %X, i8* %Y, i32* nocapture %P) nounwind {
 
45
entry:
 
46
  %0 = tail call i32 (...)* @memcmp(i8* %X, i8* %Y, i32 4) nounwind ; <i32> [#uses=1]
 
47
  %1 = icmp eq i32 %0, 0                          ; <i1> [#uses=1]
 
48
  br i1 %1, label %return, label %bb
 
49
 
 
50
bb:                                               ; preds = %entry
 
51
  store i32 4, i32* %P, align 4
 
52
  ret void
 
53
 
 
54
return:                                           ; preds = %entry
 
55
  ret void
 
56
; CHECK: memcmp4:
 
57
; CHECK: movl    (%rsi), %eax
 
58
; CHECK: cmpl    %eax, (%rdi)
 
59
}
 
60
 
 
61
define void @memcmp4a(i8* %X, i32* nocapture %P) nounwind {
 
62
entry:
 
63
  %0 = tail call i32 (...)* @memcmp(i8* %X, i8* getelementptr inbounds ([23 x i8]* @.str, i32 0, i32 1), i32 4) nounwind ; <i32> [#uses=1]
 
64
  %1 = icmp eq i32 %0, 0                          ; <i1> [#uses=1]
 
65
  br i1 %1, label %return, label %bb
 
66
 
 
67
bb:                                               ; preds = %entry
 
68
  store i32 4, i32* %P, align 4
 
69
  ret void
 
70
 
 
71
return:                                           ; preds = %entry
 
72
  ret void
 
73
; CHECK: memcmp4a:
 
74
; CHECK: cmpl $1869573999, (%rdi)
 
75
}
 
76
 
 
77
define void @memcmp8(i8* %X, i8* %Y, i32* nocapture %P) nounwind {
 
78
entry:
 
79
  %0 = tail call i32 (...)* @memcmp(i8* %X, i8* %Y, i32 8) nounwind ; <i32> [#uses=1]
 
80
  %1 = icmp eq i32 %0, 0                          ; <i1> [#uses=1]
 
81
  br i1 %1, label %return, label %bb
 
82
 
 
83
bb:                                               ; preds = %entry
 
84
  store i32 4, i32* %P, align 4
 
85
  ret void
 
86
 
 
87
return:                                           ; preds = %entry
 
88
  ret void
 
89
; CHECK: memcmp8:
 
90
; CHECK: movq    (%rsi), %rax
 
91
; CHECK: cmpq    %rax, (%rdi)
 
92
}
 
93
 
 
94
define void @memcmp8a(i8* %X, i32* nocapture %P) nounwind {
 
95
entry:
 
96
  %0 = tail call i32 (...)* @memcmp(i8* %X, i8* getelementptr inbounds ([23 x i8]* @.str, i32 0, i32 0), i32 8) nounwind ; <i32> [#uses=1]
 
97
  %1 = icmp eq i32 %0, 0                          ; <i1> [#uses=1]
 
98
  br i1 %1, label %return, label %bb
 
99
 
 
100
bb:                                               ; preds = %entry
 
101
  store i32 4, i32* %P, align 4
 
102
  ret void
 
103
 
 
104
return:                                           ; preds = %entry
 
105
  ret void
 
106
; CHECK: memcmp8a:
 
107
; CHECK: movabsq $8029759185026510694, %rax
 
108
; CHECK: cmpq   %rax, (%rdi)
 
109
}
 
110