1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch64 --mattr=+lasx < %s | FileCheck %s
4 declare i32 @llvm.loongarch.lasx.xbz.b(<32 x i8>)
6 define i32 @lasx_xbz_b(<32 x i8> %va) nounwind {
7 ; CHECK-LABEL: lasx_xbz_b:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: xvsetanyeqz.b $fcc0, $xr0
10 ; CHECK-NEXT: bcnez $fcc0, .LBB0_2
11 ; CHECK-NEXT: # %bb.1: # %entry
12 ; CHECK-NEXT: addi.w $a0, $zero, 0
14 ; CHECK-NEXT: .LBB0_2: # %entry
15 ; CHECK-NEXT: addi.w $a0, $zero, 1
18 %res = call i32 @llvm.loongarch.lasx.xbz.b(<32 x i8> %va)
22 declare i32 @llvm.loongarch.lasx.xbz.h(<16 x i16>)
24 define i32 @lasx_xbz_h(<16 x i16> %va) nounwind {
25 ; CHECK-LABEL: lasx_xbz_h:
26 ; CHECK: # %bb.0: # %entry
27 ; CHECK-NEXT: xvsetanyeqz.h $fcc0, $xr0
28 ; CHECK-NEXT: bcnez $fcc0, .LBB1_2
29 ; CHECK-NEXT: # %bb.1: # %entry
30 ; CHECK-NEXT: addi.w $a0, $zero, 0
32 ; CHECK-NEXT: .LBB1_2: # %entry
33 ; CHECK-NEXT: addi.w $a0, $zero, 1
36 %res = call i32 @llvm.loongarch.lasx.xbz.h(<16 x i16> %va)
40 declare i32 @llvm.loongarch.lasx.xbz.w(<8 x i32>)
42 define i32 @lasx_xbz_w(<8 x i32> %va) nounwind {
43 ; CHECK-LABEL: lasx_xbz_w:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: xvsetanyeqz.w $fcc0, $xr0
46 ; CHECK-NEXT: bcnez $fcc0, .LBB2_2
47 ; CHECK-NEXT: # %bb.1: # %entry
48 ; CHECK-NEXT: addi.w $a0, $zero, 0
50 ; CHECK-NEXT: .LBB2_2: # %entry
51 ; CHECK-NEXT: addi.w $a0, $zero, 1
54 %res = call i32 @llvm.loongarch.lasx.xbz.w(<8 x i32> %va)
58 declare i32 @llvm.loongarch.lasx.xbz.d(<4 x i64>)
60 define i32 @lasx_xbz_d(<4 x i64> %va) nounwind {
61 ; CHECK-LABEL: lasx_xbz_d:
62 ; CHECK: # %bb.0: # %entry
63 ; CHECK-NEXT: xvsetanyeqz.d $fcc0, $xr0
64 ; CHECK-NEXT: bcnez $fcc0, .LBB3_2
65 ; CHECK-NEXT: # %bb.1: # %entry
66 ; CHECK-NEXT: addi.w $a0, $zero, 0
68 ; CHECK-NEXT: .LBB3_2: # %entry
69 ; CHECK-NEXT: addi.w $a0, $zero, 1
72 %res = call i32 @llvm.loongarch.lasx.xbz.d(<4 x i64> %va)