Skip to content

Commit 520876d

Browse files
committed
[PowerPC] make tests immune to improved undef handling
The fma mutate test will not exercise what it was intended to test once we simplify those ops immediately, but the test will still pass with the existing CHECKs, so I'm leaving it in case that still has minimal value. llvm-svn: 373149
1 parent 243058f commit 520876d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

llvm/test/CodeGen/PowerPC/pr38087.ll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #
88
; Function Attrs: nounwind readnone speculatable
99
declare { i32, i1 } @llvm.usub.with.overflow.i32(i32, i32) #0
1010

11-
define void @draw_llvm_vs_variant0() {
11+
define void @draw_llvm_vs_variant0(<4 x float> %x) {
1212
; CHECK-LABEL: draw_llvm_vs_variant0:
1313
; CHECK: # %bb.0: # %entry
1414
; CHECK-NEXT: lfd f0, 0(r3)
15-
; CHECK-NEXT: xxpermdi v2, f0, f0, 2
16-
; CHECK-NEXT: vmrglh v2, v2, v2
17-
; CHECK-NEXT: vextsh2w v2, v2
18-
; CHECK-NEXT: xvcvsxwsp vs0, v2
15+
; CHECK-NEXT: xxpermdi v3, f0, f0, 2
16+
; CHECK-NEXT: vmrglh v3, v3, v3
17+
; CHECK-NEXT: vextsh2w v3, v3
18+
; CHECK-NEXT: xvcvsxwsp vs0, v3
1919
; CHECK-NEXT: xxspltw vs0, vs0, 2
20-
; CHECK-NEXT: xvmaddasp vs0, vs0, vs0
20+
; CHECK-NEXT: xvmaddasp vs0, v2, v2
2121
; CHECK-NEXT: stxvx vs0, 0, r3
2222
; CHECK-NEXT: blr
2323
entry:
@@ -49,7 +49,7 @@ entry:
4949
%24 = and <4 x i32> %23, %22
5050
%25 = bitcast <4 x i32> %24 to <4 x float>
5151
%26 = shufflevector <4 x float> %25, <4 x float> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
52-
%27 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> undef, <4 x float> undef, <4 x float> %26)
52+
%27 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %x, <4 x float> %x, <4 x float> %26)
5353
store <4 x float> %27, <4 x float>* undef
5454
ret void
5555
}

llvm/test/CodeGen/PowerPC/vsx-fma-mutate-undef.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ target datalayout = "e-m:e-i64:64-n32:64"
33
target triple = "powerpc64le-unknown-linux-gnu"
44

55
; Function Attrs: nounwind
6-
define void @acosh_float8(<4 x i32> %v1, <4 x i32> %v2) #0 {
6+
define void @acosh_float8(<4 x i32> %v1, <4 x i32> %v2, <4 x float> %x) #0 {
77
entry:
88
br i1 undef, label %if.then, label %if.end
99

1010
if.then: ; preds = %entry
11-
%0 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> undef, <4 x float> <float 0x3FE62E4200000000, float 0x3FE62E4200000000, float 0x3FE62E4200000000, float 0x3FE62E4200000000>, <4 x float> undef) #0
11+
%0 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %x, <4 x float> <float 0x3FE62E4200000000, float 0x3FE62E4200000000, float 0x3FE62E4200000000, float 0x3FE62E4200000000>, <4 x float> %x) #0
1212
%astype.i.i.74.i = bitcast <4 x float> %0 to <4 x i32>
1313
%and.i.i.76.i = and <4 x i32> %astype.i.i.74.i, %v1
1414
%or.i.i.79.i = or <4 x i32> %and.i.i.76.i, %v2

0 commit comments

Comments
 (0)