bitwise-pred-128b.ll
2.85 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
; RUN: llc -march=hexagon < %s | FileCheck %s
; CHECK-LABEL: t00
; CHECK: vand(v{{[0-9:]+}},v{{[0-9:]+}})
define <128 x i8> @t00(<128 x i8> %a0, <128 x i8> %a1) #0 {
%q0 = trunc <128 x i8> %a0 to <128 x i1>
%q1 = trunc <128 x i8> %a1 to <128 x i1>
%q2 = and <128 x i1> %q0, %q1
%v0 = zext <128 x i1> %q2 to <128 x i8>
ret <128 x i8> %v0
}
declare <1024 x i1> @llvm.hexagon.vandvrt.128B(<128 x i8>, i32)
; CHECK-LABEL: t01
; CHECK: vor(v{{[0-9:]+}},v{{[0-9:]+}})
define <128 x i8> @t01(<128 x i8> %a0, <128 x i8> %a1) #0 {
%q0 = trunc <128 x i8> %a0 to <128 x i1>
%q1 = trunc <128 x i8> %a1 to <128 x i1>
%q2 = or <128 x i1> %q0, %q1
%v0 = zext <128 x i1> %q2 to <128 x i8>
ret <128 x i8> %v0
}
; CHECK-LABEL: t02
; CHECK: vxor(v{{[0-9:]+}},v{{[0-9:]+}})
define <128 x i8> @t02(<128 x i8> %a0, <128 x i8> %a1) #0 {
%q0 = trunc <128 x i8> %a0 to <128 x i1>
%q1 = trunc <128 x i8> %a1 to <128 x i1>
%q2 = xor <128 x i1> %q0, %q1
%v0 = zext <128 x i1> %q2 to <128 x i8>
ret <128 x i8> %v0
}
; CHECK-LABEL: t10
; CHECK: vand(v{{[0-9:]+}},v{{[0-9:]+}})
define <64 x i16> @t10(<64 x i16> %a0, <64 x i16> %a1) #0 {
%q0 = trunc <64 x i16> %a0 to <64 x i1>
%q1 = trunc <64 x i16> %a1 to <64 x i1>
%q2 = and <64 x i1> %q0, %q1
%v0 = zext <64 x i1> %q2 to <64 x i16>
ret <64 x i16> %v0
}
; CHECK-LABEL: t11
; CHECK: vor(v{{[0-9:]+}},v{{[0-9:]+}})
define <64 x i16> @t11(<64 x i16> %a0, <64 x i16> %a1) #0 {
%q0 = trunc <64 x i16> %a0 to <64 x i1>
%q1 = trunc <64 x i16> %a1 to <64 x i1>
%q2 = or <64 x i1> %q0, %q1
%v0 = zext <64 x i1> %q2 to <64 x i16>
ret <64 x i16> %v0
}
; CHECK-LABEL: t12
; CHECK: vxor(v{{[0-9:]+}},v{{[0-9:]+}})
define <64 x i16> @t12(<64 x i16> %a0, <64 x i16> %a1) #0 {
%q0 = trunc <64 x i16> %a0 to <64 x i1>
%q1 = trunc <64 x i16> %a1 to <64 x i1>
%q2 = xor <64 x i1> %q0, %q1
%v0 = zext <64 x i1> %q2 to <64 x i16>
ret <64 x i16> %v0
}
; CHECK-LABEL: t20
; CHECK: vand(v{{[0-9:]+}},v{{[0-9:]+}})
define <32 x i32> @t20(<32 x i32> %a0, <32 x i32> %a1) #0 {
%q0 = trunc <32 x i32> %a0 to <32 x i1>
%q1 = trunc <32 x i32> %a1 to <32 x i1>
%q2 = and <32 x i1> %q0, %q1
%v0 = zext <32 x i1> %q2 to <32 x i32>
ret <32 x i32> %v0
}
; CHECK-LABEL: t21
; CHECK: vor(v{{[0-9:]+}},v{{[0-9:]+}})
define <32 x i32> @t21(<32 x i32> %a0, <32 x i32> %a1) #0 {
%q0 = trunc <32 x i32> %a0 to <32 x i1>
%q1 = trunc <32 x i32> %a1 to <32 x i1>
%q2 = or <32 x i1> %q0, %q1
%v0 = zext <32 x i1> %q2 to <32 x i32>
ret <32 x i32> %v0
}
; CHECK-LABEL: t22
; CHECK: vxor(v{{[0-9:]+}},v{{[0-9:]+}})
define <32 x i32> @t22(<32 x i32> %a0, <32 x i32> %a1) #0 {
%q0 = trunc <32 x i32> %a0 to <32 x i1>
%q1 = trunc <32 x i32> %a1 to <32 x i1>
%q2 = xor <32 x i1> %q0, %q1
%v0 = zext <32 x i1> %q2 to <32 x i32>
ret <32 x i32> %v0
}
attributes #0 = { nounwind readnone "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length128b" }