llvm.org GIT mirror llvm / 209f437
My original test case was bogus. Reverting to crasher case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28767 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Laskey 13 years ago
1 changed file(s) with 33 addition(s) and 46 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc -fast
11
2 uint %test1(uint %tmp1) {
3 %tmp2 = or uint %tmp1, 2147483648
4 %tmp3 = shr uint %tmp2, ubyte 31
5 %tmp4 = and uint %tmp3, 2147483648
6 %tmp5 = seteq uint %tmp4, 0
7 br bool %tmp5, label %cond_true, label %cond_false
8
9 cond_true:
10 ret uint %tmp1
11
12 cond_false:
2 %struct.cl_perfunc_opts = type { ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, int, int, int, int, int, int, int }
3 %cl_pf_opts = external global %struct.cl_perfunc_opts ; <%struct.cl_perfunc_opts*> [#uses=2]
134
14 ret uint %tmp2
5 implementation ; Functions:
6
7 void %set_flags_from_O() {
8 entry:
9 %tmp22 = setgt int 0, 0 ; [#uses=1]
10 br bool %tmp22, label %cond_true23, label %cond_next159
11
12 cond_true23: ; preds = %entry
13 %tmp138 = getelementptr %struct.cl_perfunc_opts* %cl_pf_opts, int 0, uint 8 ; [#uses=1]
14 %tmp138 = cast ubyte* %tmp138 to uint* ; [#uses=2]
15 %tmp139 = load uint* %tmp138 ; [#uses=1]
16 %tmp140 = shl uint 1, ubyte 27 ; [#uses=1]
17 %tmp141 = and uint %tmp140, 134217728 ; [#uses=1]
18 %tmp142 = and uint %tmp139, 4160749567 ; [#uses=1]
19 %tmp143 = or uint %tmp142, %tmp141 ; [#uses=1]
20 store uint %tmp143, uint* %tmp138
21 %tmp144 = getelementptr %struct.cl_perfunc_opts* %cl_pf_opts, int 0, uint 8 ; [#uses=1]
22 %tmp144 = cast ubyte* %tmp144 to uint* ; [#uses=1]
23 %tmp145 = load uint* %tmp144 ; [#uses=1]
24 %tmp146 = shl uint %tmp145, ubyte 22 ; [#uses=1]
25 %tmp147 = shr uint %tmp146, ubyte 31 ; [#uses=1]
26 %tmp147 = cast uint %tmp147 to ubyte ; [#uses=1]
27 %tmp148 = seteq ubyte %tmp147, 0 ; [#uses=1]
28 br bool %tmp148, label %cond_true149, label %cond_next159
29
30 cond_true149: ; preds = %cond_true23
31 %tmp150 = cast ubyte* null to uint* ; [#uses=0]
32 ret void
33
34 cond_next159: ; preds = %cond_true23, %entry
35 ret void
1536 }
16
17
18 uint %test2(uint %tmp1) {
19 %tmp2 = or uint %tmp1, 2147483648
20 %tmp3 = cast uint %tmp2 to int
21 %tmp4 = shr int %tmp3, ubyte 31
22 %tmp5 = cast int %tmp4 to uint
23 %tmp6 = and uint %tmp5, 2147483648
24 %tmp7 = seteq uint %tmp6, 0
25 br bool %tmp7, label %cond_true, label %cond_false
26
27 cond_true:
28 ret uint %tmp1
29
30 cond_false:
31
32 ret uint %tmp2
33 }
34
35
36 uint %test3(uint %tmp1) {
37 %tmp2 = or uint %tmp1, 1
38 %tmp3 = shl uint %tmp2, ubyte 31
39 %tmp4 = and uint %tmp3, 1
40 %tmp5 = seteq uint %tmp4, 0
41 br bool %tmp5, label %cond_true, label %cond_false
42
43 cond_true:
44 ret uint %tmp1
45
46 cond_false:
47
48 ret uint %tmp2
49 }