blob: 30ea4ee445abfc253a7baa20ecb8c94d462b6f06 [file] [log] [blame]
Reid Spencer64050992006-12-29 20:01:32 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
2; RUN: grep 'icmp' | wc -l | grep 1
3; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
4; RUN: grep 'icmp ugt' | wc -l | grep 1
5;
Reid Spencer266e42b2006-12-23 06:05:41 +00006; ModuleID = 'bugpoint-tooptimize.bc'
7target datalayout = "e-p:32:32"
8target endian = little
9target pointersize = 32
10target triple = "i686-pc-linux-gnu"
11%r = external global [17 x int] ; <[17 x int]*> [#uses=1]
12
13implementation ; Functions:
14
15bool %print_pgm_cond_true(int %tmp12.reload, int* %tmp16.out) {
16newFuncRoot:
17 br label %cond_true
18
19bb27.exitStub: ; preds = %cond_true
20 store int %tmp16, int* %tmp16.out
21 ret bool true
22
23cond_next23.exitStub: ; preds = %cond_true
24 store int %tmp16, int* %tmp16.out
25 ret bool false
26
27cond_true: ; preds = %newFuncRoot
28 %tmp15 = getelementptr [17 x int]* %r, int 0, int %tmp12.reload ; <int*> [#uses=1]
29 %tmp16 = load int* %tmp15 ; <int> [#uses=4]
30 %tmp18 = icmp slt int %tmp16, -31 ; <bool> [#uses=1]
31 %tmp21 = icmp sgt int %tmp16, 31 ; <bool> [#uses=1]
32 %bothcond = or bool %tmp18, %tmp21 ; <bool> [#uses=1]
33 br bool %bothcond, label %bb27.exitStub, label %cond_next23.exitStub
34}
35