[llvm] [DFAJumpThreading] Handle circular determinator (PR #78177)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 12:54:38 PST 2024
================
@@ -267,3 +267,38 @@ entry:
end:
ret void
}
+
+define void @self-reference(i1 %c) {
+; CHECK-LABEL: @self-reference(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br i1 [[C:%.*]], label [[DOTSPLIT_PREHEADER:%.*]], label [[DOTSPLIT_PREHEADER]]
+; CHECK: .split.preheader:
+; CHECK-NEXT: br label [[DOTSPLIT:%.*]]
+; CHECK: .split:
+; CHECK-NEXT: [[TMP0:%.*]] = phi i32 [ 0, [[DOTSPLIT_PREHEADER]] ]
+; CHECK-NEXT: switch i32 [[TMP0]], label [[END:%.*]] [
+; CHECK-NEXT: i32 -1, label [[END]]
+; CHECK-NEXT: i32 0, label [[DOTSPLIT_JT4294967295:%.*]]
+; CHECK-NEXT: ]
+; CHECK: .split.jt4294967295:
+; CHECK-NEXT: [[TMP1:%.*]] = phi i32 [ -1, [[DOTSPLIT]] ]
+; CHECK-NEXT: br label [[END]]
+; CHECK: end:
+; CHECK-NEXT: ret void
+;
+entry:
+ br i1 %c, label %.split.preheader, label %.split.preheader
----------------
nikic wrote:
Is this split preheader somehow relevant?
https://github.com/llvm/llvm-project/pull/78177
More information about the llvm-commits
mailing list