diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-02 02:26:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-02 02:26:54 +0000 |
commit | 302240d73eecdcd23841bfd69f8a6f547857732a (patch) | |
tree | 4728f5b4a4fc805cb038ffc4c3f205667cef359b /llvm/test/Transforms/LoopUnswitch/crash.ll | |
parent | 29bb9272a62ddc8a13a82bee1e85136e912a371b (diff) | |
download | bcm5719-llvm-302240d73eecdcd23841bfd69f8a6f547857732a.tar.gz bcm5719-llvm-302240d73eecdcd23841bfd69f8a6f547857732a.zip |
fix a crash in loop unswitch on a loop invariant vector condition.
llvm-svn: 95055
Diffstat (limited to 'llvm/test/Transforms/LoopUnswitch/crash.ll')
-rw-r--r-- | llvm/test/Transforms/LoopUnswitch/crash.ll | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/test/Transforms/LoopUnswitch/crash.ll b/llvm/test/Transforms/LoopUnswitch/crash.ll index a50bd54e787..fac55a6bb1a 100644 --- a/llvm/test/Transforms/LoopUnswitch/crash.ll +++ b/llvm/test/Transforms/LoopUnswitch/crash.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -loop-unswitch -disable-output -define void @sort_Eq(i32* %S2) { +define void @test1(i32* %S2) { entry: br i1 false, label %list_Length.exit, label %cond_true.i cond_true.i: ; preds = %entry @@ -30,3 +30,18 @@ return: ; preds = %return.loopexit, %list_Length.exit9 ret void } +define void @test2(i32 %x1, i32 %y1, i32 %z1, i32 %r1) nounwind { +entry: + br label %bb.nph + +bb.nph: ; preds = %entry + %and.i13521 = and <4 x i1> undef, undef ; <<4 x i1>> [#uses=1] + br label %for.body + +for.body: ; preds = %for.body, %bb.nph + %or.i = select <4 x i1> %and.i13521, <4 x i32> undef, <4 x i32> undef ; <<4 x i32>> [#uses=0] + br i1 false, label %for.body, label %for.end + +for.end: ; preds = %for.body, %entry + ret void +} |