~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/CodeGen/X86/xor.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 -march=x86 -mattr=+sse2  | FileCheck %s -check-prefix=X32
 
2
; RUN: llc < %s -march=x86-64 | FileCheck %s -check-prefix=X64
 
3
 
 
4
; Though it is undefined, we want xor undef,undef to produce zero.
 
5
define <4 x i32> @test1() nounwind {
 
6
        %tmp = xor <4 x i32> undef, undef
 
7
        ret <4 x i32> %tmp
 
8
        
 
9
; X32: test1:
 
10
; X32:  xorps   %xmm0, %xmm0
 
11
; X32:  ret
 
12
}
 
13
 
 
14
; Though it is undefined, we want xor undef,undef to produce zero.
 
15
define i32 @test2() nounwind{
 
16
        %tmp = xor i32 undef, undef
 
17
        ret i32 %tmp
 
18
; X32: test2:
 
19
; X32:  xorl    %eax, %eax
 
20
; X32:  ret
 
21
}
 
22
 
 
23
define i32 @test3(i32 %a, i32 %b) nounwind  {
 
24
entry:
 
25
        %tmp1not = xor i32 %b, -2
 
26
        %tmp3 = and i32 %tmp1not, %a
 
27
        %tmp4 = lshr i32 %tmp3, 1
 
28
        ret i32 %tmp4
 
29
        
 
30
; X64: test3:
 
31
; X64:  notl    %esi
 
32
; X64:  andl    %edi, %esi
 
33
; X64:  movl    %esi, %eax
 
34
; X64:  shrl    %eax
 
35
; X64:  ret
 
36
 
 
37
; X32: test3:
 
38
; X32:  movl    8(%esp), %eax
 
39
; X32:  notl    %eax
 
40
; X32:  andl    4(%esp), %eax
 
41
; X32:  shrl    %eax
 
42
; X32:  ret
 
43
}
 
44
 
 
45
define i32 @test4(i32 %a, i32 %b) nounwind  {
 
46
entry:
 
47
        br label %bb
 
48
bb:
 
49
        %b_addr.0 = phi i32 [ %b, %entry ], [ %tmp8, %bb ]
 
50
        %a_addr.0 = phi i32 [ %a, %entry ], [ %tmp3, %bb ]
 
51
        %tmp3 = xor i32 %a_addr.0, %b_addr.0
 
52
        %tmp4not = xor i32 %tmp3, 2147483647
 
53
        %tmp6 = and i32 %tmp4not, %b_addr.0
 
54
        %tmp8 = shl i32 %tmp6, 1
 
55
        %tmp10 = icmp eq i32 %tmp8, 0
 
56
        br i1 %tmp10, label %bb12, label %bb
 
57
bb12:
 
58
        ret i32 %tmp3
 
59
        
 
60
; X64: test4:
 
61
; X64:    notl  [[REG:%[a-z]+]]
 
62
; X64:    andl  {{.*}}[[REG]]
 
63
; X32: test4:
 
64
; X32:    notl  [[REG:%[a-z]+]]
 
65
; X32:    andl  {{.*}}[[REG]]
 
66
}
 
67
 
 
68
define i16 @test5(i16 %a, i16 %b) nounwind  {
 
69
entry:
 
70
        br label %bb
 
71
bb:
 
72
        %b_addr.0 = phi i16 [ %b, %entry ], [ %tmp8, %bb ]
 
73
        %a_addr.0 = phi i16 [ %a, %entry ], [ %tmp3, %bb ]
 
74
        %tmp3 = xor i16 %a_addr.0, %b_addr.0
 
75
        %tmp4not = xor i16 %tmp3, 32767
 
76
        %tmp6 = and i16 %tmp4not, %b_addr.0
 
77
        %tmp8 = shl i16 %tmp6, 1
 
78
        %tmp10 = icmp eq i16 %tmp8, 0
 
79
        br i1 %tmp10, label %bb12, label %bb
 
80
bb12:
 
81
        ret i16 %tmp3
 
82
; X64: test5:
 
83
; X64:    notw  [[REG:%[a-z]+]]
 
84
; X64:    andw  {{.*}}[[REG]]
 
85
; X32: test5:
 
86
; X32:    notw  [[REG:%[a-z]+]]
 
87
; X32:    andw  {{.*}}[[REG]]
 
88
}
 
89
 
 
90
define i8 @test6(i8 %a, i8 %b) nounwind  {
 
91
entry:
 
92
        br label %bb
 
93
bb:
 
94
        %b_addr.0 = phi i8 [ %b, %entry ], [ %tmp8, %bb ]
 
95
        %a_addr.0 = phi i8 [ %a, %entry ], [ %tmp3, %bb ]
 
96
        %tmp3 = xor i8 %a_addr.0, %b_addr.0
 
97
        %tmp4not = xor i8 %tmp3, 127
 
98
        %tmp6 = and i8 %tmp4not, %b_addr.0
 
99
        %tmp8 = shl i8 %tmp6, 1
 
100
        %tmp10 = icmp eq i8 %tmp8, 0
 
101
        br i1 %tmp10, label %bb12, label %bb
 
102
bb12:
 
103
        ret i8 %tmp3
 
104
; X64: test6:
 
105
; X64:    notb  [[REG:%[a-z]+]]
 
106
; X64:    andb  {{.*}}[[REG]]
 
107
; X32: test6:
 
108
; X32:    notb  [[REG:%[a-z]+]]
 
109
; X32:    andb  {{.*}}[[REG]]
 
110
}
 
111
 
 
112
define i32 @test7(i32 %a, i32 %b) nounwind  {
 
113
entry:
 
114
        br label %bb
 
115
bb:
 
116
        %b_addr.0 = phi i32 [ %b, %entry ], [ %tmp8, %bb ]
 
117
        %a_addr.0 = phi i32 [ %a, %entry ], [ %tmp3, %bb ]
 
118
        %tmp3 = xor i32 %a_addr.0, %b_addr.0
 
119
        %tmp4not = xor i32 %tmp3, 2147483646
 
120
        %tmp6 = and i32 %tmp4not, %b_addr.0
 
121
        %tmp8 = shl i32 %tmp6, 1
 
122
        %tmp10 = icmp eq i32 %tmp8, 0
 
123
        br i1 %tmp10, label %bb12, label %bb
 
124
bb12:
 
125
        ret i32 %tmp3
 
126
; X64: test7:
 
127
; X64:    xorl  $2147483646, [[REG:%[a-z]+]]
 
128
; X64:    andl  {{.*}}[[REG]]
 
129
; X32: test7:
 
130
; X32:    xorl  $2147483646, [[REG:%[a-z]+]]
 
131
; X32:    andl  {{.*}}[[REG]]
 
132
}
 
133
 
 
134
define i32 @test8(i32 %a) nounwind {
 
135
; rdar://7553032
 
136
entry:
 
137
  %t1 = sub i32 0, %a
 
138
  %t2 = add i32 %t1, -1
 
139
  ret i32 %t2
 
140
; X64: test8:
 
141
; X64:   notl %eax
 
142
; X32: test8:
 
143
; X32:   notl %eax
 
144
}