Skip to content

Commit b08f8d9

Browse files
committed
Replace branches with poison
This test is a crash test, which generates different code for well defined-branches. The original approach with replacing undef with a new function argument may break some tests coverage. However, LLVM will not support undef in the long run. Thus, we replaced the original undef branches with poison, so that we remove undef and also keep the test coverage.
1 parent f3e741e commit b08f8d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/test/DebugInfo/X86/earlydup-crash.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone
88

9-
define internal ptr @framework_construct_pathname(ptr %fname, ptr %dir, i1 %arg) nounwind ssp !dbg !2 {
9+
define internal ptr @framework_construct_pathname(ptr %fname, ptr %dir) nounwind ssp !dbg !2 {
1010
entry:
11-
br i1 %arg, label %bb33, label %bb
11+
br i1 poison, label %bb33, label %bb
1212

1313
bb: ; preds = %entry
1414
%tmp = icmp eq i32 undef, 0
1515
%tmp1 = add i32 0, 11
1616
call void @llvm.dbg.value(metadata i32 %tmp1, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1)
17-
br i1 %arg, label %bb18, label %bb31.preheader
17+
br i1 poison, label %bb18, label %bb31.preheader
1818

1919
bb31.preheader: ; preds = %bb19, %bb
2020
br label %bb31
@@ -30,7 +30,7 @@ bb19: ; preds = %bb18
3030
bb22: ; preds = %bb31
3131
%tmp4 = add i32 0, %tmp1
3232
call void @foobar(i32 %tmp4)
33-
br i1 %arg, label %bb33, label %bb31
33+
br i1 poison, label %bb33, label %bb31
3434

3535
bb31: ; preds = %bb22, %bb31.preheader
3636
br i1 false, label %bb33, label %bb22

0 commit comments

Comments
 (0)