diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-11-01 04:49:29 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-11-01 04:49:29 +0000 |
commit | a49b828f8fe1f50d23bf177cf019610e938c336b (patch) | |
tree | 692233024dc72c179314a0ea5970ea6934e26429 /llvm/test/Transforms/InstCombine | |
parent | 86fe42d1844a3c51866a16b560c7a0028a30ed73 (diff) | |
download | bcm5719-llvm-a49b828f8fe1f50d23bf177cf019610e938c336b.tar.gz bcm5719-llvm-a49b828f8fe1f50d23bf177cf019610e938c336b.zip |
Make sure we use the right insertion point when instcombine replaces a PHI with another instruction. (Specifically, don't insert an arbitrary instruction before a PHI.) Fixes PR11275.
llvm-svn: 143437
Diffstat (limited to 'llvm/test/Transforms/InstCombine')
-rw-r--r-- | llvm/test/Transforms/InstCombine/crash.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/crash.ll b/llvm/test/Transforms/InstCombine/crash.ll index 1a657f53a60..54a77aab45f 100644 --- a/llvm/test/Transforms/InstCombine/crash.ll +++ b/llvm/test/Transforms/InstCombine/crash.ll @@ -374,3 +374,28 @@ for.inc: ; preds = %for.cond return: ; No predecessors! ret void } + +; PR11275 +declare void @test18b() noreturn +declare void @test18foo(double**) +declare void @test18a() noreturn +define fastcc void @test18x(i8* %t0, i1 %b) uwtable align 2 { +entry: + br i1 %b, label %e1, label %e2 +e1: + %t2 = bitcast i8* %t0 to double** + invoke void @test18b() noreturn + to label %u unwind label %lpad +e2: + %t4 = bitcast i8* %t0 to double** + invoke void @test18a() noreturn + to label %u unwind label %lpad +lpad: + %t5 = phi double** [ %t2, %e1 ], [ %t4, %e2 ] + %lpad.nonloopexit262 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + cleanup + call void @test18foo(double** %t5) + unreachable +u: + unreachable +} |