Skip to content

Commit f4087ca

Browse files
committed
[RISCV] update tests
1 parent 4f6d7a6 commit f4087ca

File tree

6 files changed

+63
-250
lines changed

6 files changed

+63
-250
lines changed

llvm/test/CodeGen/RISCV/callee-saved-gprs.ll

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,7 @@ define void @callee() nounwind {
432432
; RV32IZCMP-NEXT: sw a0, %lo(var+4)(t0)
433433
; RV32IZCMP-NEXT: lw a0, 28(sp) # 4-byte Folded Reload
434434
; RV32IZCMP-NEXT: sw a0, %lo(var)(t0)
435-
; RV32IZCMP-NEXT: cm.pop {ra, s0-s11}, 96
436-
; RV32IZCMP-NEXT: ret
435+
; RV32IZCMP-NEXT: cm.popret {ra, s0-s11}, 96
437436
;
438437
; RV32IZCMP-WITH-FP-LABEL: callee:
439438
; RV32IZCMP-WITH-FP: # %bb.0:
@@ -942,8 +941,7 @@ define void @callee() nounwind {
942941
; RV64IZCMP-NEXT: sw a0, %lo(var+4)(t0)
943942
; RV64IZCMP-NEXT: ld a0, 40(sp) # 8-byte Folded Reload
944943
; RV64IZCMP-NEXT: sw a0, %lo(var)(t0)
945-
; RV64IZCMP-NEXT: cm.pop {ra, s0-s11}, 160
946-
; RV64IZCMP-NEXT: ret
944+
; RV64IZCMP-NEXT: cm.popret {ra, s0-s11}, 160
947945
;
948946
; RV64IZCMP-WITH-FP-LABEL: callee:
949947
; RV64IZCMP-WITH-FP: # %bb.0:
@@ -1613,8 +1611,7 @@ define void @caller() nounwind {
16131611
; RV32IZCMP-NEXT: lw a0, 92(sp) # 4-byte Folded Reload
16141612
; RV32IZCMP-NEXT: sw a0, %lo(var)(s0)
16151613
; RV32IZCMP-NEXT: addi sp, sp, 48
1616-
; RV32IZCMP-NEXT: cm.pop {ra, s0-s11}, 112
1617-
; RV32IZCMP-NEXT: ret
1614+
; RV32IZCMP-NEXT: cm.popret {ra, s0-s11}, 112
16181615
;
16191616
; RV32IZCMP-WITH-FP-LABEL: caller:
16201617
; RV32IZCMP-WITH-FP: # %bb.0:
@@ -2309,8 +2306,7 @@ define void @caller() nounwind {
23092306
; RV64IZCMP-NEXT: ld a0, 168(sp) # 8-byte Folded Reload
23102307
; RV64IZCMP-NEXT: sw a0, %lo(var)(s0)
23112308
; RV64IZCMP-NEXT: addi sp, sp, 128
2312-
; RV64IZCMP-NEXT: cm.pop {ra, s0-s11}, 160
2313-
; RV64IZCMP-NEXT: ret
2309+
; RV64IZCMP-NEXT: cm.popret {ra, s0-s11}, 160
23142310
;
23152311
; RV64IZCMP-WITH-FP-LABEL: caller:
23162312
; RV64IZCMP-WITH-FP: # %bb.0:
@@ -2521,10 +2517,7 @@ define void @foo() {
25212517
; RV32IZCMP-NEXT: #APP
25222518
; RV32IZCMP-NEXT: li s4, 0
25232519
; RV32IZCMP-NEXT: #NO_APP
2524-
; RV32IZCMP-NEXT: cm.pop {ra, s0-s4}, 32
2525-
; RV32IZCMP-NEXT: .cfi_def_cfa_offset 0
2526-
; RV32IZCMP-NEXT: .cfi_restore s4
2527-
; RV32IZCMP-NEXT: ret
2520+
; RV32IZCMP-NEXT: cm.popret {ra, s0-s4}, 32
25282521
;
25292522
; RV32IZCMP-WITH-FP-LABEL: foo:
25302523
; RV32IZCMP-WITH-FP: # %bb.0: # %entry
@@ -2606,10 +2599,7 @@ define void @foo() {
26062599
; RV64IZCMP-NEXT: #APP
26072600
; RV64IZCMP-NEXT: li s4, 0
26082601
; RV64IZCMP-NEXT: #NO_APP
2609-
; RV64IZCMP-NEXT: cm.pop {ra, s0-s4}, 48
2610-
; RV64IZCMP-NEXT: .cfi_def_cfa_offset 0
2611-
; RV64IZCMP-NEXT: .cfi_restore s4
2612-
; RV64IZCMP-NEXT: ret
2602+
; RV64IZCMP-NEXT: cm.popret {ra, s0-s4}, 48
26132603
;
26142604
; RV64IZCMP-WITH-FP-LABEL: foo:
26152605
; RV64IZCMP-WITH-FP: # %bb.0: # %entry
@@ -2697,10 +2687,7 @@ define void @bar() {
26972687
; RV32IZCMP-NEXT: #APP
26982688
; RV32IZCMP-NEXT: li s11, 0
26992689
; RV32IZCMP-NEXT: #NO_APP
2700-
; RV32IZCMP-NEXT: cm.pop {ra, s0-s11}, 64
2701-
; RV32IZCMP-NEXT: .cfi_def_cfa_offset 0
2702-
; RV32IZCMP-NEXT: .cfi_restore s11
2703-
; RV32IZCMP-NEXT: ret
2690+
; RV32IZCMP-NEXT: cm.popret {ra, s0-s11}, 64
27042691
;
27052692
; RV32IZCMP-WITH-FP-LABEL: bar:
27062693
; RV32IZCMP-WITH-FP: # %bb.0: # %entry
@@ -2782,10 +2769,7 @@ define void @bar() {
27822769
; RV64IZCMP-NEXT: #APP
27832770
; RV64IZCMP-NEXT: li s11, 0
27842771
; RV64IZCMP-NEXT: #NO_APP
2785-
; RV64IZCMP-NEXT: cm.pop {ra, s0-s11}, 112
2786-
; RV64IZCMP-NEXT: .cfi_def_cfa_offset 0
2787-
; RV64IZCMP-NEXT: .cfi_restore s11
2788-
; RV64IZCMP-NEXT: ret
2772+
; RV64IZCMP-NEXT: cm.popret {ra, s0-s11}, 112
27892773
;
27902774
; RV64IZCMP-WITH-FP-LABEL: bar:
27912775
; RV64IZCMP-WITH-FP: # %bb.0: # %entry

llvm/test/CodeGen/RISCV/cm_mvas_mvsa.ll

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ define i32 @zcmp_mv(i32 %num, i32 %f) nounwind {
4343
; CHECK32ZCMP-NEXT: cm.mva01s s1, s0
4444
; CHECK32ZCMP-NEXT: call func
4545
; CHECK32ZCMP-NEXT: add a0, s2, s0
46-
; CHECK32ZCMP-NEXT: cm.pop {ra, s0-s2}, 16
47-
; CHECK32ZCMP-NEXT: ret
46+
; CHECK32ZCMP-NEXT: cm.popret {ra, s0-s2}, 16
4847
;
4948
; CHECK64I-LABEL: zcmp_mv:
5049
; CHECK64I: # %bb.0:
@@ -77,8 +76,7 @@ define i32 @zcmp_mv(i32 %num, i32 %f) nounwind {
7776
; CHECK64ZCMP-NEXT: cm.mva01s s1, s0
7877
; CHECK64ZCMP-NEXT: call func
7978
; CHECK64ZCMP-NEXT: addw a0, s2, s0
80-
; CHECK64ZCMP-NEXT: cm.pop {ra, s0-s2}, 32
81-
; CHECK64ZCMP-NEXT: ret
79+
; CHECK64ZCMP-NEXT: cm.popret {ra, s0-s2}, 32
8280
%call = call i32 @func(i32 %num, i32 %f)
8381
%call1 = call i32 @func(i32 %num, i32 %f)
8482
%res = add i32 %call, %f
@@ -121,8 +119,7 @@ define i32 @not_zcmp_mv(i32 %num, i32 %f) nounwind {
121119
; CHECK32ZCMP-NEXT: li a0, 1
122120
; CHECK32ZCMP-NEXT: mv a1, s0
123121
; CHECK32ZCMP-NEXT: call func
124-
; CHECK32ZCMP-NEXT: cm.pop {ra, s0-s1}, 16
125-
; CHECK32ZCMP-NEXT: ret
122+
; CHECK32ZCMP-NEXT: cm.popret {ra, s0-s1}, 16
126123
;
127124
; CHECK64I-LABEL: not_zcmp_mv:
128125
; CHECK64I: # %bb.0:
@@ -159,8 +156,7 @@ define i32 @not_zcmp_mv(i32 %num, i32 %f) nounwind {
159156
; CHECK64ZCMP-NEXT: li a0, 1
160157
; CHECK64ZCMP-NEXT: mv a1, s0
161158
; CHECK64ZCMP-NEXT: call func
162-
; CHECK64ZCMP-NEXT: cm.pop {ra, s0-s1}, 32
163-
; CHECK64ZCMP-NEXT: ret
159+
; CHECK64ZCMP-NEXT: cm.popret {ra, s0-s1}, 32
164160
%call = call i32 @foo(i32 %num)
165161
%call1 = call i32 @foo(i32 %f)
166162
%tmp = call i32 @foo(i32 %call)

0 commit comments

Comments
 (0)