1 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 ; CHECK: vand(v{{[0-9:]+}},v{{[0-9:]+}})
5 define <128 x i8> @t00(<128 x i8> %a0, <128 x i8> %a1) #0 {
6 %q0 = trunc <128 x i8> %a0 to <128 x i1>
7 %q1 = trunc <128 x i8> %a1 to <128 x i1>
8 %q2 = and <128 x i1> %q0, %q1
9 %v0 = zext <128 x i1> %q2 to <128 x i8>
13 declare <128 x i1> @llvm.hexagon.vandvrt.128B(<128 x i8>, i32)
16 ; CHECK: vor(v{{[0-9:]+}},v{{[0-9:]+}})
17 define <128 x i8> @t01(<128 x i8> %a0, <128 x i8> %a1) #0 {
18 %q0 = trunc <128 x i8> %a0 to <128 x i1>
19 %q1 = trunc <128 x i8> %a1 to <128 x i1>
20 %q2 = or <128 x i1> %q0, %q1
21 %v0 = zext <128 x i1> %q2 to <128 x i8>
26 ; CHECK: vxor(v{{[0-9:]+}},v{{[0-9:]+}})
27 define <128 x i8> @t02(<128 x i8> %a0, <128 x i8> %a1) #0 {
28 %q0 = trunc <128 x i8> %a0 to <128 x i1>
29 %q1 = trunc <128 x i8> %a1 to <128 x i1>
30 %q2 = xor <128 x i1> %q0, %q1
31 %v0 = zext <128 x i1> %q2 to <128 x i8>
36 ; CHECK: vand(v{{[0-9:]+}},v{{[0-9:]+}})
37 define <64 x i16> @t10(<64 x i16> %a0, <64 x i16> %a1) #0 {
38 %q0 = trunc <64 x i16> %a0 to <64 x i1>
39 %q1 = trunc <64 x i16> %a1 to <64 x i1>
40 %q2 = and <64 x i1> %q0, %q1
41 %v0 = zext <64 x i1> %q2 to <64 x i16>
46 ; CHECK: vor(v{{[0-9:]+}},v{{[0-9:]+}})
47 define <64 x i16> @t11(<64 x i16> %a0, <64 x i16> %a1) #0 {
48 %q0 = trunc <64 x i16> %a0 to <64 x i1>
49 %q1 = trunc <64 x i16> %a1 to <64 x i1>
50 %q2 = or <64 x i1> %q0, %q1
51 %v0 = zext <64 x i1> %q2 to <64 x i16>
56 ; CHECK: vxor(v{{[0-9:]+}},v{{[0-9:]+}})
57 define <64 x i16> @t12(<64 x i16> %a0, <64 x i16> %a1) #0 {
58 %q0 = trunc <64 x i16> %a0 to <64 x i1>
59 %q1 = trunc <64 x i16> %a1 to <64 x i1>
60 %q2 = xor <64 x i1> %q0, %q1
61 %v0 = zext <64 x i1> %q2 to <64 x i16>
66 ; CHECK: vand(v{{[0-9:]+}},v{{[0-9:]+}})
67 define <32 x i32> @t20(<32 x i32> %a0, <32 x i32> %a1) #0 {
68 %q0 = trunc <32 x i32> %a0 to <32 x i1>
69 %q1 = trunc <32 x i32> %a1 to <32 x i1>
70 %q2 = and <32 x i1> %q0, %q1
71 %v0 = zext <32 x i1> %q2 to <32 x i32>
76 ; CHECK: vor(v{{[0-9:]+}},v{{[0-9:]+}})
77 define <32 x i32> @t21(<32 x i32> %a0, <32 x i32> %a1) #0 {
78 %q0 = trunc <32 x i32> %a0 to <32 x i1>
79 %q1 = trunc <32 x i32> %a1 to <32 x i1>
80 %q2 = or <32 x i1> %q0, %q1
81 %v0 = zext <32 x i1> %q2 to <32 x i32>
86 ; CHECK: vxor(v{{[0-9:]+}},v{{[0-9:]+}})
87 define <32 x i32> @t22(<32 x i32> %a0, <32 x i32> %a1) #0 {
88 %q0 = trunc <32 x i32> %a0 to <32 x i1>
89 %q1 = trunc <32 x i32> %a1 to <32 x i1>
90 %q2 = xor <32 x i1> %q0, %q1
91 %v0 = zext <32 x i1> %q2 to <32 x i32>
95 attributes #0 = { nounwind readnone "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length128b" }