Home | History | Annotate | Download | only in R600
      1 ; RUN: llc -march=r600 -mcpu=redwood -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=BUG64 --check-prefix=FUNC
      2 ; RUN: llc -march=r600 -mcpu=sumo -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=BUG64 --check-prefix=FUNC
      3 ; RUN: llc -march=r600 -mcpu=barts -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=BUG64 --check-prefix=FUNC
      4 ; RUN: llc -march=r600 -mcpu=turks -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=BUG64 --check-prefix=FUNC
      5 ; RUN: llc -march=r600 -mcpu=caicos -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=BUG64 --check-prefix=FUNC
      6 ; RUN: llc -march=r600 -mcpu=cedar -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=BUG32 --check-prefix=FUNC
      7 ; RUN: llc -march=r600 -mcpu=juniper -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=NOBUG --check-prefix=FUNC
      8 ; RUN: llc -march=r600 -mcpu=cypress -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=NOBUG --check-prefix=FUNC
      9 ; RUN: llc -march=r600 -mcpu=cayman -debug-only=r600cf %s -o - 2>&1 | FileCheck %s --check-prefix=NOBUG --check-prefix=FUNC
     10 
     11 ; REQUIRES: asserts
     12 
     13 ; We are currently allocating 2 extra sub-entries on Evergreen / NI for
     14 ; non-WQM push instructions if we change this to 1, then we will need to
     15 ; add one level of depth to each of these tests.
     16 
     17 ; BUG64-NOT: Applying bug work-around
     18 ; BUG32-NOT: Applying bug work-around
     19 ; NOBUG-NOT: Applying bug work-around
     20 ; FUNC-LABEL: @nested3
     21 define void @nested3(i32 addrspace(1)* %out, i32 %cond) {
     22 entry:
     23   %0 = icmp sgt i32 %cond, 0
     24   br i1 %0, label %if.1, label %end
     25 
     26 if.1:
     27   %1 = icmp sgt i32 %cond, 10
     28   br i1 %1, label %if.2, label %if.store.1
     29 
     30 if.store.1:
     31   store i32 1, i32 addrspace(1)* %out
     32   br label %end
     33 
     34 if.2:
     35   %2 = icmp sgt i32 %cond, 20
     36   br i1 %2, label %if.3, label %if.2.store
     37 
     38 if.2.store:
     39   store i32 2, i32 addrspace(1)* %out
     40   br label %end
     41 
     42 if.3:
     43   store i32 3, i32 addrspace(1)* %out
     44   br label %end
     45 
     46 end:
     47   ret void
     48 }
     49 
     50 ; BUG64: Applying bug work-around
     51 ; BUG32-NOT: Applying bug work-around
     52 ; NOBUG-NOT: Applying bug work-around
     53 ; FUNC-LABEL: @nested4
     54 define void @nested4(i32 addrspace(1)* %out, i32 %cond) {
     55 entry:
     56   %0 = icmp sgt i32 %cond, 0
     57   br i1 %0, label %if.1, label %end
     58 
     59 if.1:
     60   %1 = icmp sgt i32 %cond, 10
     61   br i1 %1, label %if.2, label %if.1.store
     62 
     63 if.1.store:
     64   store i32 1, i32 addrspace(1)* %out
     65   br label %end
     66 
     67 if.2:
     68   %2 = icmp sgt i32 %cond, 20
     69   br i1 %2, label %if.3, label %if.2.store
     70 
     71 if.2.store:
     72   store i32 2, i32 addrspace(1)* %out
     73   br label %end
     74 
     75 if.3:
     76   %3 = icmp sgt i32 %cond, 30
     77   br i1 %3, label %if.4, label %if.3.store
     78 
     79 if.3.store:
     80   store i32 3, i32 addrspace(1)* %out
     81   br label %end
     82 
     83 if.4:
     84   store i32 4, i32 addrspace(1)* %out
     85   br label %end
     86 
     87 end:
     88   ret void
     89 }
     90 
     91 ; BUG64: Applying bug work-around
     92 ; BUG32-NOT: Applying bug work-around
     93 ; NOBUG-NOT: Applying bug work-around
     94 ; FUNC-LABEL: @nested7
     95 define void @nested7(i32 addrspace(1)* %out, i32 %cond) {
     96 entry:
     97   %0 = icmp sgt i32 %cond, 0
     98   br i1 %0, label %if.1, label %end
     99 
    100 if.1:
    101   %1 = icmp sgt i32 %cond, 10
    102   br i1 %1, label %if.2, label %if.1.store
    103 
    104 if.1.store:
    105   store i32 1, i32 addrspace(1)* %out
    106   br label %end
    107 
    108 if.2:
    109   %2 = icmp sgt i32 %cond, 20
    110   br i1 %2, label %if.3, label %if.2.store
    111 
    112 if.2.store:
    113   store i32 2, i32 addrspace(1)* %out
    114   br label %end
    115 
    116 if.3:
    117   %3 = icmp sgt i32 %cond, 30
    118   br i1 %3, label %if.4, label %if.3.store
    119 
    120 if.3.store:
    121   store i32 3, i32 addrspace(1)* %out
    122   br label %end
    123 
    124 if.4:
    125   %4 = icmp sgt i32 %cond, 40
    126   br i1 %4, label %if.5, label %if.4.store
    127 
    128 if.4.store:
    129   store i32 4, i32 addrspace(1)* %out
    130   br label %end
    131 
    132 if.5:
    133   %5 = icmp sgt i32 %cond, 50
    134   br i1 %5, label %if.6, label %if.5.store
    135 
    136 if.5.store:
    137   store i32 5, i32 addrspace(1)* %out
    138   br label %end
    139 
    140 if.6:
    141   %6 = icmp sgt i32 %cond, 60
    142   br i1 %6, label %if.7, label %if.6.store
    143 
    144 if.6.store:
    145   store i32 6, i32 addrspace(1)* %out
    146   br label %end
    147 
    148 if.7:
    149   store i32 7, i32 addrspace(1)* %out
    150   br label %end
    151 
    152 end:
    153   ret void
    154 }
    155 
    156 ; BUG64: Applying bug work-around
    157 ; BUG32: Applying bug work-around
    158 ; NOBUG-NOT: Applying bug work-around
    159 ; FUNC-LABEL: @nested8
    160 define void @nested8(i32 addrspace(1)* %out, i32 %cond) {
    161 entry:
    162   %0 = icmp sgt i32 %cond, 0
    163   br i1 %0, label %if.1, label %end
    164 
    165 if.1:
    166   %1 = icmp sgt i32 %cond, 10
    167   br i1 %1, label %if.2, label %if.1.store
    168 
    169 if.1.store:
    170   store i32 1, i32 addrspace(1)* %out
    171   br label %end
    172 
    173 if.2:
    174   %2 = icmp sgt i32 %cond, 20
    175   br i1 %2, label %if.3, label %if.2.store
    176 
    177 if.2.store:
    178   store i32 2, i32 addrspace(1)* %out
    179   br label %end
    180 
    181 if.3:
    182   %3 = icmp sgt i32 %cond, 30
    183   br i1 %3, label %if.4, label %if.3.store
    184 
    185 if.3.store:
    186   store i32 3, i32 addrspace(1)* %out
    187   br label %end
    188 
    189 if.4:
    190   %4 = icmp sgt i32 %cond, 40
    191   br i1 %4, label %if.5, label %if.4.store
    192 
    193 if.4.store:
    194   store i32 4, i32 addrspace(1)* %out
    195   br label %end
    196 
    197 if.5:
    198   %5 = icmp sgt i32 %cond, 50
    199   br i1 %5, label %if.6, label %if.5.store
    200 
    201 if.5.store:
    202   store i32 5, i32 addrspace(1)* %out
    203   br label %end
    204 
    205 if.6:
    206   %6 = icmp sgt i32 %cond, 60
    207   br i1 %6, label %if.7, label %if.6.store
    208 
    209 if.6.store:
    210   store i32 6, i32 addrspace(1)* %out
    211   br label %end
    212 
    213 if.7:
    214   %7 = icmp sgt i32 %cond, 70
    215   br i1 %7, label %if.8, label %if.7.store
    216 
    217 if.7.store:
    218   store i32 7, i32 addrspace(1)* %out
    219   br label %end
    220 
    221 if.8:
    222   store i32 8, i32 addrspace(1)* %out
    223   br label %end
    224 
    225 end:
    226   ret void
    227 }
    228