xref: /llvm-project/llvm/test/CodeGen/VE/Vector/vp_and.ll (revision 5240e0b891fc4bf69d362199f70c94c28a7b9465)
1*5240e0b8SFangrui Song; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s
23ffbc793SSimon Moll
3611d3c63SSimon Molldeclare <256 x i32> @llvm.vp.and.v256i32(<256 x i32>, <256 x i32>, <256 x i1>, i32)
43ffbc793SSimon Moll
5611d3c63SSimon Molldefine fastcc <256 x i32> @test_vp_and_v256i32(<256 x i32> %i0, <256 x i32> %i1, <256 x i1> %m, i32 %n) {
6611d3c63SSimon Moll; CHECK-LABEL: test_vp_and_v256i32:
7611d3c63SSimon Moll; CHECK:       # %bb.0:
8611d3c63SSimon Moll; CHECK-NEXT:    and %s0, %s0, (32)0
9611d3c63SSimon Moll; CHECK-NEXT:    lvl %s0
10611d3c63SSimon Moll; CHECK-NEXT:    pvand.lo %v0, %v0, %v1, %vm1
11611d3c63SSimon Moll; CHECK-NEXT:    b.l.t (, %s10)
123ffbc793SSimon Moll  %r0 = call <256 x i32> @llvm.vp.and.v256i32(<256 x i32> %i0, <256 x i32> %i1, <256 x i1> %m, i32 %n)
133ffbc793SSimon Moll  ret <256 x i32> %r0
143ffbc793SSimon Moll}
153ffbc793SSimon Moll
16611d3c63SSimon Moll
17611d3c63SSimon Molldeclare <256 x i64> @llvm.vp.and.v256i64(<256 x i64>, <256 x i64>, <256 x i1>, i32)
18611d3c63SSimon Moll
19611d3c63SSimon Molldefine fastcc <256 x i64> @test_vp_int_v256i64(<256 x i64> %i0, <256 x i64> %i1, <256 x i1> %m, i32 %n) {
20611d3c63SSimon Moll; CHECK-LABEL: test_vp_int_v256i64:
21611d3c63SSimon Moll; CHECK:       # %bb.0:
22611d3c63SSimon Moll; CHECK-NEXT:    and %s0, %s0, (32)0
23611d3c63SSimon Moll; CHECK-NEXT:    lvl %s0
24611d3c63SSimon Moll; CHECK-NEXT:    vand %v0, %v0, %v1, %vm1
25611d3c63SSimon Moll; CHECK-NEXT:    b.l.t (, %s10)
26611d3c63SSimon Moll  %r0 = call <256 x i64> @llvm.vp.and.v256i64(<256 x i64> %i0, <256 x i64> %i1, <256 x i1> %m, i32 %n)
27611d3c63SSimon Moll  ret <256 x i64> %r0
28611d3c63SSimon Moll}
29