Skip to content

Commit c78b954

Browse files
committed
Update reduction test. Remove standalone test file
Based on post commit review comments at 68ffed1.
1 parent d94426d commit c78b954

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

llvm/test/Transforms/LoopVectorize/fp-reduction-crash.ll

Lines changed: 0 additions & 21 deletions
This file was deleted.

llvm/test/Transforms/LoopVectorize/reduction-order.ll

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,27 @@ t31:
3737
ret i64 undef
3838
}
3939

40+
; Make sure we do not fail when checking for ordered reduction. This test just
41+
; exercises the path and bails out without performing vectorization.
42+
; CHECK-LABEL: quux
43+
; CHECK-NOT: fadd <4 x
44+
define void @quux() {
45+
bb:
46+
br label %header
47+
48+
latch: ; preds = %header
49+
%tmp = phi double [ %tmp6, %header ]
50+
br i1 undef, label %header, label %bb2
51+
52+
bb2: ; preds = %latch
53+
%tmp3 = phi double [ %tmp, %latch ]
54+
ret void
55+
56+
header: ; preds = %latch, %bb
57+
%tmp5 = phi double [ 1.300000e+01, %bb ], [ %tmp, %latch ]
58+
%tmp6 = fadd double %tmp5, 1.000000e+00
59+
br label %latch
60+
}
61+
4062
!1 = !{!"function_entry_count", i64 801}
4163
!2 = !{!"branch_weights", i32 746, i32 1}

0 commit comments

Comments
 (0)