]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/Transforms/InstCombine/2005-07-07-DeadPHILoop.ll
[canonicalize] Teach InstCombine to canonicalize loads which are only
[opencl/llvm.git] / test / Transforms / InstCombine / 2005-07-07-DeadPHILoop.ll
1 ; RUN: opt < %s -instcombine -disable-output
3 ; This example caused instcombine to spin into an infinite loop.
5 define void @test(i32* %P) {
6         ret void
8 Dead:           ; preds = %Dead
9         %X = phi i32 [ %Y, %Dead ]              ; <i32> [#uses=1]
10         %Y = sdiv i32 %X, 10            ; <i32> [#uses=2]
11         store i32 %Y, i32* %P
12         br label %Dead
13 }