blob: 44c72587b25118f9732a4d418a7783bab4219093 [file] [log] [blame]
Vikram S. Advea7a1c7e2002-07-10 21:54:05 +00001;;
2;; Test the sequence:
3;; cast -> setle 0, %cast -> br %cond
4;; This sequence should cause the cast value to be forwarded twice,
5;; i.e., cast is forwarded to the setle and teh setle is forwarded
6;; to the branch.
7;; register argument of the "branch-on-register" instruction, i.e.,
8;;
9;; This produces the bogus output instruction:
10;; brlez <NULL VALUE>, .L_SumArray_bb3.
11;; This came from %bb1 of sumarrray.ll generated from sumarray.c.
12
13
14;;;; ******************************************************
15implementation
16;;;; ******************************************************
17
18int "SumArray"(int %Num)
19begin
20bb0: ;[#uses=3]
21 br label %Top
22Top:
23 %Num = alloca int ; <int *> [#uses=2]
24 store int %Num, int * %Num
25 %reg108 = load int * %Num ; <int> [#uses=2]
26 %cast1006 = cast int %reg108 to uint ; <uint> [#uses=1]
27 %cond1001 = setle uint %cast1006, 0 ; <bool> [#uses=1]
28 br bool %cond1001, label %bb6, label %Top
29
30bb6:
31 ret int 42
32end
33