1 ; RUN: opt -hexagon-loop-idiom -loop-deletion -gvn -S < %s
4 ; This tests that the HexagonLoopIdiom pass does not mark LCSSA information
5 ; as preserved. The pass calls SimplifyInstruction is a couple of places,
6 ; which can invalidate LCSSA. Specifically, the uses of a LCSSA phi variable
7 ; are replaced by the incoming value.
9 define hidden void @test() local_unnamed_addr #0 {
14 br i1 undef, label %do.body311, label %if.end375
17 br i1 undef, label %do.end318, label %do.body311
20 br i1 undef, label %if.end322, label %if.end375
23 %sub325 = sub i32 undef, undef
24 br i1 undef, label %do.end329, label %do.body311
27 %sub325.lcssa = phi i32 [ %sub325, %if.end322 ]
31 %row_width.7 = phi i32 [ %sub325.lcssa, %do.end329 ], [ %dec334, %do.body330 ]
32 %sp.5 = phi i8* [ undef, %do.end329 ], [ %incdec.ptr331, %do.body330 ]
33 %dp.addr.5 = phi i8* [ undef, %do.end329 ], [ %incdec.ptr332, %do.body330 ]
34 %0 = load i8, i8* %sp.5, align 1
35 store i8 %0, i8* %dp.addr.5, align 1
36 %incdec.ptr332 = getelementptr inbounds i8, i8* %dp.addr.5, i32 1
37 %incdec.ptr331 = getelementptr inbounds i8, i8* %sp.5, i32 1
38 %dec334 = add i32 %row_width.7, -1
39 %cmp335 = icmp eq i32 %dec334, 0
40 br i1 %cmp335, label %if.end375, label %do.body330
46 attributes #0 = { nounwind }