Skip to content

Commit 5c02eca

Browse files
committed
[SelectionDAG] Adjust Existing Tests; NFC
Add new test prefixes to some tests. Currently, these prefixes are unused but a subsequent commit will change the test result such that they become necessary. Furthermore, rename tests that will be folded after a subsequent commit.
1 parent ebb5abe commit 5c02eca

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

llvm/test/CodeGen/PowerPC/urem-lkk.ll

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -mcpu=ppc64 < %s | FileCheck --check-prefix=CHECK %s
3-
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -mcpu=ppc < %s | FileCheck --check-prefix=CHECK %s
2+
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -mcpu=ppc64 < %s | FileCheck --check-prefixes=CHECK,PPC32 %s
3+
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -mcpu=ppc < %s | FileCheck --check-prefixes=CHECK,PPC64 %s
44

55
define i32 @fold_urem_positive_odd(i32 %x) {
66
; CHECK-LABEL: fold_urem_positive_odd:
@@ -85,9 +85,8 @@ define i32 @dont_fold_urem_i32_umax(i32 %x) {
8585
ret i32 %1
8686
}
8787

88-
; Don't fold i64 urem
89-
define i64 @dont_fold_urem_i64(i64 %x) {
90-
; CHECK-LABEL: dont_fold_urem_i64:
88+
define i64 @fold_urem_i64(i64 %x) {
89+
; CHECK-LABEL: fold_urem_i64:
9190
; CHECK: # %bb.0:
9291
; CHECK-NEXT: mflr 0
9392
; CHECK-NEXT: stwu 1, -16(1)
@@ -104,3 +103,6 @@ define i64 @dont_fold_urem_i64(i64 %x) {
104103
%1 = urem i64 %x, 98
105104
ret i64 %1
106105
}
106+
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
107+
; PPC32: {{.*}}
108+
; PPC64: {{.*}}

llvm/test/CodeGen/RISCV/urem-lkk.ll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,8 @@ define i32 @dont_fold_urem_i32_umax(i32 %x) nounwind {
218218
ret i32 %1
219219
}
220220

221-
; Don't fold i64 urem
222-
define i64 @dont_fold_urem_i64(i64 %x) nounwind {
223-
; RV32I-LABEL: dont_fold_urem_i64:
221+
define i64 @fold_urem_i64(i64 %x) nounwind {
222+
; RV32I-LABEL: fold_urem_i64:
224223
; RV32I: # %bb.0:
225224
; RV32I-NEXT: addi sp, sp, -16
226225
; RV32I-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
@@ -231,7 +230,7 @@ define i64 @dont_fold_urem_i64(i64 %x) nounwind {
231230
; RV32I-NEXT: addi sp, sp, 16
232231
; RV32I-NEXT: ret
233232
;
234-
; RV32IM-LABEL: dont_fold_urem_i64:
233+
; RV32IM-LABEL: fold_urem_i64:
235234
; RV32IM: # %bb.0:
236235
; RV32IM-NEXT: addi sp, sp, -16
237236
; RV32IM-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
@@ -242,12 +241,12 @@ define i64 @dont_fold_urem_i64(i64 %x) nounwind {
242241
; RV32IM-NEXT: addi sp, sp, 16
243242
; RV32IM-NEXT: ret
244243
;
245-
; RV64I-LABEL: dont_fold_urem_i64:
244+
; RV64I-LABEL: fold_urem_i64:
246245
; RV64I: # %bb.0:
247246
; RV64I-NEXT: li a1, 98
248247
; RV64I-NEXT: tail __umoddi3
249248
;
250-
; RV64IM-LABEL: dont_fold_urem_i64:
249+
; RV64IM-LABEL: fold_urem_i64:
251250
; RV64IM: # %bb.0:
252251
; RV64IM-NEXT: lui a1, %hi(.LCPI6_0)
253252
; RV64IM-NEXT: ld a1, %lo(.LCPI6_0)(a1)

llvm/test/CodeGen/RISCV/urem-vector-lkk.ll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,8 @@ define <4 x i16> @dont_fold_urem_i16_smax(<4 x i16> %x) nounwind {
778778
ret <4 x i16> %1
779779
}
780780

781-
; Don't fold i64 urem.
782-
define <4 x i64> @dont_fold_urem_i64(<4 x i64> %x) nounwind {
783-
; RV32I-LABEL: dont_fold_urem_i64:
781+
define <4 x i64> @fold_urem_i64(<4 x i64> %x) nounwind {
782+
; RV32I-LABEL: fold_urem_i64:
784783
; RV32I: # %bb.0:
785784
; RV32I-NEXT: addi sp, sp, -48
786785
; RV32I-NEXT: sw ra, 44(sp) # 4-byte Folded Spill
@@ -850,7 +849,7 @@ define <4 x i64> @dont_fold_urem_i64(<4 x i64> %x) nounwind {
850849
; RV32I-NEXT: addi sp, sp, 48
851850
; RV32I-NEXT: ret
852851
;
853-
; RV32IM-LABEL: dont_fold_urem_i64:
852+
; RV32IM-LABEL: fold_urem_i64:
854853
; RV32IM: # %bb.0:
855854
; RV32IM-NEXT: addi sp, sp, -48
856855
; RV32IM-NEXT: sw ra, 44(sp) # 4-byte Folded Spill
@@ -920,7 +919,7 @@ define <4 x i64> @dont_fold_urem_i64(<4 x i64> %x) nounwind {
920919
; RV32IM-NEXT: addi sp, sp, 48
921920
; RV32IM-NEXT: ret
922921
;
923-
; RV64I-LABEL: dont_fold_urem_i64:
922+
; RV64I-LABEL: fold_urem_i64:
924923
; RV64I: # %bb.0:
925924
; RV64I-NEXT: addi sp, sp, -48
926925
; RV64I-NEXT: sd ra, 40(sp) # 8-byte Folded Spill
@@ -956,7 +955,7 @@ define <4 x i64> @dont_fold_urem_i64(<4 x i64> %x) nounwind {
956955
; RV64I-NEXT: addi sp, sp, 48
957956
; RV64I-NEXT: ret
958957
;
959-
; RV64IM-LABEL: dont_fold_urem_i64:
958+
; RV64IM-LABEL: fold_urem_i64:
960959
; RV64IM: # %bb.0:
961960
; RV64IM-NEXT: ld a2, 8(a1)
962961
; RV64IM-NEXT: ld a3, 16(a1)

0 commit comments

Comments
 (0)