1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s
6 ; Function Attrs: nounwind
7 define fastcc <256 x i32> @and_vv_v256i32(<256 x i32> %x, <256 x i32> %y) {
8 ; CHECK-LABEL: and_vv_v256i32:
10 ; CHECK-NEXT: lea %s0, 256
12 ; CHECK-NEXT: pvand.lo %v0, %v0, %v1
13 ; CHECK-NEXT: b.l.t (, %s10)
14 %z = and <256 x i32> %x, %y
18 ; Function Attrs: nounwind
19 define fastcc <256 x i32> @and_sv_v256i32(i32 %x, <256 x i32> %y) {
20 ; CHECK-LABEL: and_sv_v256i32:
22 ; CHECK-NEXT: and %s0, %s0, (32)0
23 ; CHECK-NEXT: lea %s1, 256
25 ; CHECK-NEXT: pvand.lo %v0, %s0, %v0
26 ; CHECK-NEXT: b.l.t (, %s10)
27 %xins = insertelement <256 x i32> undef, i32 %x, i32 0
28 %vx = shufflevector <256 x i32> %xins, <256 x i32> undef, <256 x i32> zeroinitializer
29 %z = and <256 x i32> %vx, %y
33 ; Function Attrs: nounwind
34 define fastcc <256 x i32> @and_vs_v256i32(<256 x i32> %x, i32 %y) {
35 ; CHECK-LABEL: and_vs_v256i32:
37 ; CHECK-NEXT: and %s0, %s0, (32)0
38 ; CHECK-NEXT: lea %s1, 256
40 ; CHECK-NEXT: pvand.lo %v0, %s0, %v0
41 ; CHECK-NEXT: b.l.t (, %s10)
42 %yins = insertelement <256 x i32> undef, i32 %y, i32 0
43 %vy = shufflevector <256 x i32> %yins, <256 x i32> undef, <256 x i32> zeroinitializer
44 %z = and <256 x i32> %x, %vy
52 ; Function Attrs: nounwind
53 define fastcc <256 x i64> @and_vv_v256i64(<256 x i64> %x, <256 x i64> %y) {
54 ; CHECK-LABEL: and_vv_v256i64:
56 ; CHECK-NEXT: lea %s0, 256
58 ; CHECK-NEXT: vand %v0, %v0, %v1
59 ; CHECK-NEXT: b.l.t (, %s10)
60 %z = and <256 x i64> %x, %y
64 ; Function Attrs: nounwind
65 define fastcc <256 x i64> @and_sv_v256i64(i64 %x, <256 x i64> %y) {
66 ; CHECK-LABEL: and_sv_v256i64:
68 ; CHECK-NEXT: lea %s1, 256
70 ; CHECK-NEXT: vand %v0, %s0, %v0
71 ; CHECK-NEXT: b.l.t (, %s10)
72 %xins = insertelement <256 x i64> undef, i64 %x, i32 0
73 %vx = shufflevector <256 x i64> %xins, <256 x i64> undef, <256 x i32> zeroinitializer
74 %z = and <256 x i64> %vx, %y
78 ; Function Attrs: nounwind
79 define fastcc <256 x i64> @and_vs_v256i64(<256 x i64> %x, i64 %y) {
80 ; CHECK-LABEL: and_vs_v256i64:
82 ; CHECK-NEXT: lea %s1, 256
84 ; CHECK-NEXT: vand %v0, %s0, %v0
85 ; CHECK-NEXT: b.l.t (, %s10)
86 %yins = insertelement <256 x i64> undef, i64 %y, i32 0
87 %vy = shufflevector <256 x i64> %yins, <256 x i64> undef, <256 x i32> zeroinitializer
88 %z = and <256 x i64> %x, %vy
93 ; We expect this to be widened.
95 ; Function Attrs: nounwind
96 define fastcc <128 x i64> @and_vv_v128i64(<128 x i64> %x, <128 x i64> %y) {
97 ; CHECK-LABEL: and_vv_v128i64:
99 ; CHECK-NEXT: lea %s0, 256
100 ; CHECK-NEXT: lvl %s0
101 ; CHECK-NEXT: vand %v0, %v0, %v1
102 ; CHECK-NEXT: b.l.t (, %s10)
103 %z = and <128 x i64> %x, %y
108 ; We expect promotion.
110 ; Function Attrs: nounwind
111 define fastcc <256 x i16> @and_vv_v256i16(<256 x i16> %x, <256 x i16> %y) {
112 ; CHECK-LABEL: and_vv_v256i16:
114 ; CHECK-NEXT: lea %s0, 256
115 ; CHECK-NEXT: lvl %s0
116 ; CHECK-NEXT: pvand.lo %v0, %v0, %v1
117 ; CHECK-NEXT: b.l.t (, %s10)
118 %z = and <256 x i16> %x, %y
123 ; We expect this to be scalarized (for now).
125 ; Function Attrs: nounwind
126 define fastcc <128 x i16> @and_vv_v128i16(<128 x i16> %x, <128 x i16> %y) {
127 ; CHECK-LABEL: and_vv_v128i16:
129 %z = and <128 x i16> %x, %y