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