1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 -mattr=+d < %s | FileCheck %s --check-prefix=LA32
3 ; RUN: llc --mtriple=loongarch64 -mattr=+d < %s | FileCheck %s --check-prefix=LA64
7 define void @bnez_i32(i32 signext %0) nounwind {
8 ; LA32-LABEL: bnez_i32:
9 ; LA32: # %bb.0: # %start
10 ; LA32-NEXT: beqz $a0, .LBB0_2
11 ; LA32-NEXT: # %bb.1: # %f
13 ; LA32-NEXT: .LBB0_2: # %t
14 ; LA32-NEXT: b %plt(bar)
16 ; LA64-LABEL: bnez_i32:
17 ; LA64: # %bb.0: # %start
18 ; LA64-NEXT: beqz $a0, .LBB0_2
19 ; LA64-NEXT: # %bb.1: # %f
21 ; LA64-NEXT: .LBB0_2: # %t
22 ; LA64-NEXT: b %plt(bar)
24 %1 = icmp eq i32 %0, 0
25 br i1 %1, label %t, label %f
35 define void @beqz_i32(i32 signext %0) nounwind {
36 ; LA32-LABEL: beqz_i32:
37 ; LA32: # %bb.0: # %start
38 ; LA32-NEXT: beqz $a0, .LBB1_2
39 ; LA32-NEXT: # %bb.1: # %t
40 ; LA32-NEXT: b %plt(bar)
41 ; LA32-NEXT: .LBB1_2: # %f
44 ; LA64-LABEL: beqz_i32:
45 ; LA64: # %bb.0: # %start
46 ; LA64-NEXT: beqz $a0, .LBB1_2
47 ; LA64-NEXT: # %bb.1: # %t
48 ; LA64-NEXT: b %plt(bar)
49 ; LA64-NEXT: .LBB1_2: # %f
52 %1 = icmp ne i32 %0, 0
53 br i1 %1, label %t, label %f
63 define void @bnez_i64(i64 %0) nounwind {
64 ; LA32-LABEL: bnez_i64:
65 ; LA32: # %bb.0: # %start
66 ; LA32-NEXT: or $a0, $a0, $a1
67 ; LA32-NEXT: beqz $a0, .LBB2_2
68 ; LA32-NEXT: # %bb.1: # %f
70 ; LA32-NEXT: .LBB2_2: # %t
71 ; LA32-NEXT: b %plt(bar)
73 ; LA64-LABEL: bnez_i64:
74 ; LA64: # %bb.0: # %start
75 ; LA64-NEXT: beqz $a0, .LBB2_2
76 ; LA64-NEXT: # %bb.1: # %f
78 ; LA64-NEXT: .LBB2_2: # %t
79 ; LA64-NEXT: b %plt(bar)
81 %1 = icmp eq i64 %0, 0
82 br i1 %1, label %t, label %f
92 define void @beqz_i64(i64 %0) nounwind {
93 ; LA32-LABEL: beqz_i64:
94 ; LA32: # %bb.0: # %start
95 ; LA32-NEXT: or $a0, $a0, $a1
96 ; LA32-NEXT: beqz $a0, .LBB3_2
97 ; LA32-NEXT: # %bb.1: # %t
98 ; LA32-NEXT: b %plt(bar)
99 ; LA32-NEXT: .LBB3_2: # %f
102 ; LA64-LABEL: beqz_i64:
103 ; LA64: # %bb.0: # %start
104 ; LA64-NEXT: beqz $a0, .LBB3_2
105 ; LA64-NEXT: # %bb.1: # %t
106 ; LA64-NEXT: b %plt(bar)
107 ; LA64-NEXT: .LBB3_2: # %f
110 %1 = icmp ne i64 %0, 0
111 br i1 %1, label %t, label %f
114 tail call void @bar()