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.xbnz.b(<32 x i8>)
6 define i32 @lasx_xbnz_b(<32 x i8> %va) nounwind {
7 ; CHECK-LABEL: lasx_xbnz_b:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: xvsetallnez.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.xbnz.b(<32 x i8> %va)
22 declare i32 @llvm.loongarch.lasx.xbnz.h(<16 x i16>)
24 define i32 @lasx_xbnz_h(<16 x i16> %va) nounwind {
25 ; CHECK-LABEL: lasx_xbnz_h:
26 ; CHECK: # %bb.0: # %entry
27 ; CHECK-NEXT: xvsetallnez.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.xbnz.h(<16 x i16> %va)
40 declare i32 @llvm.loongarch.lasx.xbnz.w(<8 x i32>)
42 define i32 @lasx_xbnz_w(<8 x i32> %va) nounwind {
43 ; CHECK-LABEL: lasx_xbnz_w:
44 ; CHECK: # %bb.0: # %entry
45 ; CHECK-NEXT: xvsetallnez.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.xbnz.w(<8 x i32> %va)
58 declare i32 @llvm.loongarch.lasx.xbnz.d(<4 x i64>)
60 define i32 @lasx_xbnz_d(<4 x i64> %va) nounwind {
61 ; CHECK-LABEL: lasx_xbnz_d:
62 ; CHECK: # %bb.0: # %entry
63 ; CHECK-NEXT: xvsetallnez.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.xbnz.d(<4 x i64> %va)