blob: 4b69386d887019cdad494a8e3e5d9a1dfbfc2bab [file] [log] [blame]
Jim Laskeydf1530a2006-06-13 13:10:44 +00001; RUN: llvm-as < %s | llc -fast
2
3uint %test1(uint %tmp1) {
4 %tmp2 = or uint %tmp1, 2147483648
5 %tmp3 = shr uint %tmp2, ubyte 31
6 %tmp4 = and uint %tmp3, 2147483648
7 %tmp5 = seteq uint %tmp4, 0
8 br bool %tmp5, label %cond_true, label %cond_false
9
10cond_true:
11 ret uint %tmp1
12
13cond_false:
14
15 ret uint %tmp2
16}
17
18
19uint %test2(uint %tmp1) {
20 %tmp2 = or uint %tmp1, 2147483648
21 %tmp3 = cast uint %tmp2 to int
22 %tmp4 = shr int %tmp3, ubyte 31
23 %tmp5 = cast int %tmp4 to uint
24 %tmp6 = and uint %tmp5, 2147483648
25 %tmp7 = seteq uint %tmp6, 0
26 br bool %tmp7, label %cond_true, label %cond_false
27
28cond_true:
29 ret uint %tmp1
30
31cond_false:
32
33 ret uint %tmp2
34}
35
36
37uint %test3(uint %tmp1) {
38 %tmp2 = or uint %tmp1, 1
39 %tmp3 = shl uint %tmp2, ubyte 31
40 %tmp4 = and uint %tmp3, 1
41 %tmp5 = seteq uint %tmp4, 0
42 br bool %tmp5, label %cond_true, label %cond_false
43
44cond_true:
45 ret uint %tmp1
46
47cond_false:
48
49 ret uint %tmp2
50}