~ubuntu-branches/ubuntu/maverick/clamav/maverick-updates

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/CodeGen/X86/vshift-1.ll

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-17 12:30:20 UTC
  • mfrom: (97.1.1 maverick-proposed)
  • Revision ID: james.westby@ubuntu.com-20101217123020-o02fhyzykv5z98ri
Tags: 0.96.5+dfsg-1ubuntu1.10.10.1
* Microversion update for Maverick (LP: #691414)
  - Improved database login times
  - Expanded use of new bytecode signatures
  - Other bugfixes/improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
; RUN: llc < %s -march=x86 -mattr=+sse2 -disable-mmx | FileCheck %s
2
 
 
3
 
; test vector shifts converted to proper SSE2 vector shifts when the shift
4
 
; amounts are the same.
5
 
 
6
 
define void @shift1a(<2 x i64> %val, <2 x i64>* %dst) nounwind {
7
 
entry:
8
 
; CHECK: shift1a:
9
 
; CHECK: psllq
10
 
  %shl = shl <2 x i64> %val, < i64 32, i64 32 >
11
 
  store <2 x i64> %shl, <2 x i64>* %dst
12
 
  ret void
13
 
}
14
 
 
15
 
define void @shift1b(<2 x i64> %val, <2 x i64>* %dst, i64 %amt) nounwind {
16
 
entry:
17
 
; CHECK: shift1b:
18
 
; CHECK: movd
19
 
; CHECK-NEXT: psllq
20
 
  %0 = insertelement <2 x i64> undef, i64 %amt, i32 0
21
 
  %1 = insertelement <2 x i64> %0, i64 %amt, i32 1
22
 
  %shl = shl <2 x i64> %val, %1
23
 
  store <2 x i64> %shl, <2 x i64>* %dst
24
 
  ret void
25
 
}
26
 
 
27
 
 
28
 
define void @shift2a(<4 x i32> %val, <4 x i32>* %dst) nounwind {
29
 
entry:
30
 
; CHECK: shift2a:
31
 
; CHECK: pslld
32
 
  %shl = shl <4 x i32> %val, < i32 5, i32 5, i32 5, i32 5 >
33
 
  store <4 x i32> %shl, <4 x i32>* %dst
34
 
  ret void
35
 
}
36
 
 
37
 
define void @shift2b(<4 x i32> %val, <4 x i32>* %dst, i32 %amt) nounwind {
38
 
entry:
39
 
; CHECK: shift2b:
40
 
; CHECK: movd
41
 
; CHECK-NEXT: pslld
42
 
  %0 = insertelement <4 x i32> undef, i32 %amt, i32 0
43
 
  %1 = insertelement <4 x i32> %0, i32 %amt, i32 1
44
 
  %2 = insertelement <4 x i32> %1, i32 %amt, i32 2
45
 
  %3 = insertelement <4 x i32> %2, i32 %amt, i32 3
46
 
  %shl = shl <4 x i32> %val, %3
47
 
  store <4 x i32> %shl, <4 x i32>* %dst
48
 
  ret void
49
 
}
50
 
 
51
 
define void @shift3a(<8 x i16> %val, <8 x i16>* %dst) nounwind {
52
 
entry:
53
 
; CHECK: shift3a:
54
 
; CHECK: psllw
55
 
  %shl = shl <8 x i16> %val, < i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5 >
56
 
  store <8 x i16> %shl, <8 x i16>* %dst
57
 
  ret void
58
 
}
59
 
 
60
 
; Make sure the shift amount is properly zero extended.
61
 
define void @shift3b(<8 x i16> %val, <8 x i16>* %dst, i16 %amt) nounwind {
62
 
entry:
63
 
; CHECK: shift3b:
64
 
; CHECK: movzwl
65
 
; CHECK: movd
66
 
; CHECK-NEXT: psllw
67
 
  %0 = insertelement <8 x i16> undef, i16 %amt, i32 0
68
 
  %1 = insertelement <8 x i16> %0, i16 %amt, i32 1
69
 
  %2 = insertelement <8 x i16> %0, i16 %amt, i32 2
70
 
  %3 = insertelement <8 x i16> %0, i16 %amt, i32 3
71
 
  %4 = insertelement <8 x i16> %0, i16 %amt, i32 4
72
 
  %5 = insertelement <8 x i16> %0, i16 %amt, i32 5
73
 
  %6 = insertelement <8 x i16> %0, i16 %amt, i32 6
74
 
  %7 = insertelement <8 x i16> %0, i16 %amt, i32 7
75
 
  %shl = shl <8 x i16> %val, %7
76
 
  store <8 x i16> %shl, <8 x i16>* %dst
77
 
  ret void
78
 
}
79