diff options
Diffstat (limited to 'test/Transforms/JumpThreading/crash.ll')
| -rw-r--r-- | test/Transforms/JumpThreading/crash.ll | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/test/Transforms/JumpThreading/crash.ll b/test/Transforms/JumpThreading/crash.ll index 361ec6cfb5a1..c65fd1014be4 100644 --- a/test/Transforms/JumpThreading/crash.ll +++ b/test/Transforms/JumpThreading/crash.ll @@ -234,3 +234,93 @@ bb2: return: ret void } + +; PR6119 +define i32 @test8(i32 %action) nounwind { +entry: + switch i32 %action, label %lor.rhs [ + i32 1, label %if.then + i32 0, label %lor.end + ] + +if.then: ; preds = %for.cond, %lor.end, %entry + ret i32 undef + +lor.rhs: ; preds = %entry + br label %lor.end + +lor.end: ; preds = %lor.rhs, %entry + %cmp103 = xor i1 undef, undef ; <i1> [#uses=1] + br i1 %cmp103, label %for.cond, label %if.then + +for.cond: ; preds = %for.body, %lor.end + br i1 undef, label %if.then, label %for.body + +for.body: ; preds = %for.cond + br label %for.cond +} + +; PR6119 +define i32 @test9(i32 %action) nounwind { +entry: + switch i32 %action, label %lor.rhs [ + i32 1, label %if.then + i32 0, label %lor.end + ] + +if.then: ; preds = %for.cond, %lor.end, %entry + ret i32 undef + +lor.rhs: ; preds = %entry + br label %lor.end + +lor.end: ; preds = %lor.rhs, %entry + %0 = phi i1 [ undef, %lor.rhs ], [ true, %entry ] ; <i1> [#uses=1] + %cmp103 = xor i1 undef, %0 ; <i1> [#uses=1] + br i1 %cmp103, label %for.cond, label %if.then + +for.cond: ; preds = %for.body, %lor.end + br i1 undef, label %if.then, label %for.body + +for.body: ; preds = %for.cond + br label %for.cond +} + +; PR6119 +define i32 @test10(i32 %action, i32 %type) nounwind { +entry: + %cmp2 = icmp eq i32 %type, 0 ; <i1> [#uses=1] + switch i32 %action, label %lor.rhs [ + i32 1, label %if.then + i32 0, label %lor.end + ] + +if.then: ; preds = %for.cond, %lor.end, %entry + ret i32 undef + +lor.rhs: ; preds = %entry + %cmp101 = icmp eq i32 %action, 2 ; <i1> [#uses=1] + br label %lor.end + +lor.end: ; preds = %lor.rhs, %entry + %0 = phi i1 [ %cmp101, %lor.rhs ], [ true, %entry ] ; <i1> [#uses=1] + %cmp103 = xor i1 %cmp2, %0 ; <i1> [#uses=1] + br i1 %cmp103, label %for.cond, label %if.then + +for.cond: ; preds = %for.body, %lor.end + br i1 undef, label %if.then, label %for.body + +for.body: ; preds = %for.cond + br label %for.cond +} + + +; PR6305 +define void @test11() nounwind { +entry: + br label %A + +A: ; preds = %entry + call void undef(i64 ptrtoint (i8* blockaddress(@test11, %A) to i64)) nounwind + unreachable +} |
