]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Transforms/LICM/2003-02-27-StoreSinkPHIs.ll
Vendor import of llvm trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / test / Transforms / LICM / 2003-02-27-StoreSinkPHIs.ll
1 ; LICM is adding stores before phi nodes.  bad.
2
3 ; RUN: opt < %s -licm
4
5 define i1 @test(i1 %c) {
6 ; <label>:0
7         br i1 %c, label %Loop, label %Out
8 Loop:           ; preds = %Loop, %0
9         store i32 0, i32* null
10         br i1 %c, label %Loop, label %Out
11 Out:            ; preds = %Loop, %0
12         %X = phi i1 [ %c, %0 ], [ true, %Loop ]         ; <i1> [#uses=1]
13         ret i1 %X
14 }
15