1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=correlated-propagation -S -o - %s | FileCheck %s
4 ; Testcase that checks that we don't end in a neverending recursion resulting in
5 ; a segmentation fault. The checks below verify that nothing is changed.
7 declare dso_local ptr @f2(ptr readnone returned) local_unnamed_addr
9 define dso_local void @f3() local_unnamed_addr {
12 ; CHECK-NEXT: br label [[FOR_COND:%.*]]
14 ; CHECK-NEXT: [[CALL6:%.*]] = call ptr @f2(ptr [[CALL6]])
15 ; CHECK-NEXT: br i1 false, label [[FOR_COND]], label [[FOR_COND3:%.*]]
17 ; CHECK-NEXT: [[C_0:%.*]] = phi ptr [ undef, [[ENTRY:%.*]] ], [ [[CALL6]], [[FOR_END:%.*]] ]
18 ; CHECK-NEXT: br label [[FOR_COND3]]
20 ; CHECK-NEXT: ret void
26 %call6 = call ptr @f2(ptr %call6)
27 br i1 false, label %for.cond, label %for.cond3
30 %c.0 = phi ptr [ undef, %entry ], [ %call6, %for.end ]