Skip to content

Commit 7d48eff

Browse files
committed
[PowerPC] Avoid call to undef in test (NFC)
Replace call to undef with a dummy function, to avoid affecting this change by changes to call undef folding.
1 parent 0bfe100 commit 7d48eff

File tree

1 file changed

+26
-21
lines changed
  • llvm/test/CodeGen/PowerPC

1 file changed

+26
-21
lines changed

llvm/test/CodeGen/PowerPC/spe.ll

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,48 +1425,53 @@ attributes #1 = { nounwind readnone speculatable willreturn }
14251425

14261426
%struct.a = type { float, float }
14271427

1428+
declare i32 @foo(double)
1429+
14281430
define void @d(%struct.a* %e, %struct.a* %f) {
14291431
; CHECK-LABEL: d:
14301432
; CHECK: # %bb.0: # %entry
14311433
; CHECK-NEXT: mflr 0
14321434
; CHECK-NEXT: stw 0, 4(1)
1433-
; CHECK-NEXT: stwu 1, -48(1)
1434-
; CHECK-NEXT: .cfi_def_cfa_offset 48
1435+
; CHECK-NEXT: stwu 1, -64(1)
1436+
; CHECK-NEXT: .cfi_def_cfa_offset 64
14351437
; CHECK-NEXT: .cfi_offset lr, 4
1438+
; CHECK-NEXT: .cfi_offset r28, -16
14361439
; CHECK-NEXT: .cfi_offset r29, -12
14371440
; CHECK-NEXT: .cfi_offset r30, -8
1441+
; CHECK-NEXT: .cfi_offset r28, -48
14381442
; CHECK-NEXT: .cfi_offset r29, -40
14391443
; CHECK-NEXT: .cfi_offset r30, -32
14401444
; CHECK-NEXT: lwz 4, 0(4)
14411445
; CHECK-NEXT: lwz 3, 0(3)
1442-
; CHECK-NEXT: stw 29, 36(1) # 4-byte Folded Spill
1443-
; CHECK-NEXT: evstdd 29, 8(1) # 8-byte Folded Spill
1446+
; CHECK-NEXT: stw 29, 52(1) # 4-byte Folded Spill
1447+
; CHECK-NEXT: evstdd 29, 24(1) # 8-byte Folded Spill
14441448
; CHECK-NEXT: efdcfs 29, 4
1445-
; CHECK-NEXT: stw 30, 40(1) # 4-byte Folded Spill
1449+
; CHECK-NEXT: stw 28, 48(1) # 4-byte Folded Spill
14461450
; CHECK-NEXT: mr 4, 29
1447-
; CHECK-NEXT: evstdd 30, 16(1) # 8-byte Folded Spill
1451+
; CHECK-NEXT: stw 30, 56(1) # 4-byte Folded Spill
1452+
; CHECK-NEXT: evstdd 28, 16(1) # 8-byte Folded Spill
1453+
; CHECK-NEXT: evstdd 30, 32(1) # 8-byte Folded Spill
14481454
; CHECK-NEXT: efdcfs 30, 3
14491455
; CHECK-NEXT: evmergehi 3, 29, 29
1450-
; CHECK-NEXT: mtctr 3
14511456
; CHECK-NEXT: # kill: def $r3 killed $r3 killed $s3
1452-
; CHECK-NEXT: bctrl
1457+
; CHECK-NEXT: bl foo
1458+
; CHECK-NEXT: mr 28, 3
14531459
; CHECK-NEXT: evmergehi 3, 30, 30
14541460
; CHECK-NEXT: mr 4, 30
1455-
; CHECK-NEXT: mtctr 3
14561461
; CHECK-NEXT: # kill: def $r3 killed $r3 killed $s3
1457-
; CHECK-NEXT: bctrl
1458-
; CHECK-NEXT: li 3, .LCPI58_0@l
1459-
; CHECK-NEXT: lis 4, .LCPI58_0@ha
1460-
; CHECK-NEXT: evlddx 3, 4, 3
1461-
; CHECK-NEXT: evldd 30, 16(1) # 8-byte Folded Reload
1462+
; CHECK-NEXT: bl foo
1463+
; CHECK-NEXT: efdcfsi 3, 28
1464+
; CHECK-NEXT: evldd 30, 32(1) # 8-byte Folded Reload
14621465
; CHECK-NEXT: efdmul 3, 29, 3
1463-
; CHECK-NEXT: evldd 29, 8(1) # 8-byte Folded Reload
14641466
; CHECK-NEXT: efscfd 3, 3
1467+
; CHECK-NEXT: evldd 29, 24(1) # 8-byte Folded Reload
14651468
; CHECK-NEXT: stw 3, 0(3)
1466-
; CHECK-NEXT: lwz 30, 40(1) # 4-byte Folded Reload
1467-
; CHECK-NEXT: lwz 29, 36(1) # 4-byte Folded Reload
1468-
; CHECK-NEXT: lwz 0, 52(1)
1469-
; CHECK-NEXT: addi 1, 1, 48
1469+
; CHECK-NEXT: evldd 28, 16(1) # 8-byte Folded Reload
1470+
; CHECK-NEXT: lwz 30, 56(1) # 4-byte Folded Reload
1471+
; CHECK-NEXT: lwz 29, 52(1) # 4-byte Folded Reload
1472+
; CHECK-NEXT: lwz 28, 48(1) # 4-byte Folded Reload
1473+
; CHECK-NEXT: lwz 0, 68(1)
1474+
; CHECK-NEXT: addi 1, 1, 64
14701475
; CHECK-NEXT: mtlr 0
14711476
; CHECK-NEXT: blr
14721477
entry:
@@ -1475,8 +1480,8 @@ entry:
14751480
%conv = fpext float %1 to double
14761481
%2 = load float, float* %0
14771482
%g = fpext float %2 to double
1478-
%3 = call i32 undef(double %g)
1479-
%h = call i32 undef(double %conv)
1483+
%3 = call i32 @foo(double %g)
1484+
%h = call i32 @foo(double %conv)
14801485
%n = sitofp i32 %3 to double
14811486
%k = fmul double %g, %n
14821487
%l = fptrunc double %k to float

0 commit comments

Comments
 (0)