CodeGen: extend f16 conversions to permit types > float.
[oota-llvm.git] / test / CodeGen / R600 / parallelandifcollapse.ll
1 ; Function Attrs: nounwind
2 ; RUN: llc < %s -march=r600 -mcpu=redwood  | FileCheck %s
3 ;
4 ; CFG flattening should use parallel-and mode to generate branch conditions and
5 ; then merge if-regions with the same bodies.
6 ;
7 ; CHECK: AND_INT
8 ; CHECK-NEXT: AND_INT
9 ; CHECK-NEXT: OR_INT
10
11 ; FIXME: For some reason having the allocas here allowed the flatten cfg pass
12 ; to do its transfomation, however now that we are using local memory for
13 ; allocas, the transformation isn't happening.
14 ; XFAIL: *
15
16 define void @_Z9chk1D_512v() #0 {
17 entry:
18   %a0 = alloca i32, align 4
19   %b0 = alloca i32, align 4
20   %c0 = alloca i32, align 4
21   %d0 = alloca i32, align 4
22   %a1 = alloca i32, align 4
23   %b1 = alloca i32, align 4
24   %c1 = alloca i32, align 4
25   %d1 = alloca i32, align 4
26   %data = alloca i32, align 4
27   %0 = load i32* %a0, align 4
28   %1 = load i32* %b0, align 4
29   %cmp = icmp ne i32 %0, %1
30   br i1 %cmp, label %land.lhs.true, label %if.end
31
32 land.lhs.true:                                    ; preds = %entry
33   %2 = load i32* %c0, align 4
34   %3 = load i32* %d0, align 4
35   %cmp1 = icmp ne i32 %2, %3
36   br i1 %cmp1, label %if.then, label %if.end
37
38 if.then:                                          ; preds = %land.lhs.true
39   store i32 1, i32* %data, align 4
40   br label %if.end
41
42 if.end:                                           ; preds = %if.then, %land.lhs.true, %entry
43   %4 = load i32* %a1, align 4
44   %5 = load i32* %b1, align 4
45   %cmp2 = icmp ne i32 %4, %5
46   br i1 %cmp2, label %land.lhs.true3, label %if.end6
47
48 land.lhs.true3:                                   ; preds = %if.end
49   %6 = load i32* %c1, align 4
50   %7 = load i32* %d1, align 4
51   %cmp4 = icmp ne i32 %6, %7
52   br i1 %cmp4, label %if.then5, label %if.end6
53
54 if.then5:                                         ; preds = %land.lhs.true3
55   store i32 1, i32* %data, align 4
56   br label %if.end6
57
58 if.end6:                                          ; preds = %if.then5, %land.lhs.true3, %if.end
59   ret void
60 }