245 lines · plain
1; RUN: llc -mtriple=r600 -mcpu=redwood -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC2; RUN: FileCheck --check-prefix=BUG64 %s < %t3 4; RUN: llc -mtriple=r600 -mcpu=sumo -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC5; RUN: FileCheck --check-prefix=BUG64 %s < %t6 7; RUN: llc -mtriple=r600 -mcpu=barts -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC8; RUN: FileCheck --check-prefix=BUG64 %s < %t9 10; RUN: llc -mtriple=r600 -mcpu=turks -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC11; RUN: FileCheck --check-prefix=BUG64 %s < %t12 13; RUN: llc -mtriple=r600 -mcpu=caicos -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC14; RUN: FileCheck --check-prefix=BUG64 %s < %t15 16; RUN: llc -mtriple=r600 -mcpu=cedar -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC17; RUN: FileCheck --check-prefix=BUG32 %s < %t18 19; RUN: llc -mtriple=r600 -mcpu=juniper -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC20; RUN: FileCheck --check-prefix=NOBUG %s < %t21 22; RUN: llc -mtriple=r600 -mcpu=cypress -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC23; RUN: FileCheck --check-prefix=NOBUG %s < %t24 25; RUN: llc -mtriple=r600 -mcpu=cayman -debug-only=r600cf %s -o - 2>%t | FileCheck %s --check-prefix=FUNC26; RUN: FileCheck --check-prefix=NOBUG %s < %t27 28; REQUIRES: asserts29 30; We are currently allocating 2 extra sub-entries on Evergreen / NI for31; non-WQM push instructions if we change this to 1, then we will need to32; add one level of depth to each of these tests.33 34; BUG64-NOT: Applying bug work-around35; BUG32-NOT: Applying bug work-around36; NOBUG-NOT: Applying bug work-around37; FUNC-LABEL: {{^}}nested3:38define amdgpu_kernel void @nested3(ptr addrspace(1) %out, i32 %cond) {39entry:40 %0 = icmp sgt i32 %cond, 041 br i1 %0, label %if.1, label %end42 43if.1:44 %1 = icmp sgt i32 %cond, 1045 br i1 %1, label %if.2, label %if.store.146 47if.store.1:48 store i32 1, ptr addrspace(1) %out49 br label %end50 51if.2:52 %2 = icmp sgt i32 %cond, 2053 br i1 %2, label %if.3, label %if.2.store54 55if.2.store:56 store i32 2, ptr addrspace(1) %out57 br label %end58 59if.3:60 store i32 3, ptr addrspace(1) %out61 br label %end62 63end:64 ret void65}66 67; BUG64: Applying bug work-around68; BUG32-NOT: Applying bug work-around69; NOBUG-NOT: Applying bug work-around70; FUNC-LABEL: {{^}}nested4:71define amdgpu_kernel void @nested4(ptr addrspace(1) %out, i32 %cond) {72entry:73 %0 = icmp sgt i32 %cond, 074 br i1 %0, label %if.1, label %end75 76if.1:77 %1 = icmp sgt i32 %cond, 1078 br i1 %1, label %if.2, label %if.1.store79 80if.1.store:81 store i32 1, ptr addrspace(1) %out82 br label %end83 84if.2:85 %2 = icmp sgt i32 %cond, 2086 br i1 %2, label %if.3, label %if.2.store87 88if.2.store:89 store i32 2, ptr addrspace(1) %out90 br label %end91 92if.3:93 %3 = icmp sgt i32 %cond, 3094 br i1 %3, label %if.4, label %if.3.store95 96if.3.store:97 store i32 3, ptr addrspace(1) %out98 br label %end99 100if.4:101 store i32 4, ptr addrspace(1) %out102 br label %end103 104end:105 ret void106}107 108; BUG64: Applying bug work-around109; BUG32-NOT: Applying bug work-around110; NOBUG-NOT: Applying bug work-around111; FUNC-LABEL: {{^}}nested7:112define amdgpu_kernel void @nested7(ptr addrspace(1) %out, i32 %cond) {113entry:114 %0 = icmp sgt i32 %cond, 0115 br i1 %0, label %if.1, label %end116 117if.1:118 %1 = icmp sgt i32 %cond, 10119 br i1 %1, label %if.2, label %if.1.store120 121if.1.store:122 store i32 1, ptr addrspace(1) %out123 br label %end124 125if.2:126 %2 = icmp sgt i32 %cond, 20127 br i1 %2, label %if.3, label %if.2.store128 129if.2.store:130 store i32 2, ptr addrspace(1) %out131 br label %end132 133if.3:134 %3 = icmp sgt i32 %cond, 30135 br i1 %3, label %if.4, label %if.3.store136 137if.3.store:138 store i32 3, ptr addrspace(1) %out139 br label %end140 141if.4:142 %4 = icmp sgt i32 %cond, 40143 br i1 %4, label %if.5, label %if.4.store144 145if.4.store:146 store i32 4, ptr addrspace(1) %out147 br label %end148 149if.5:150 %5 = icmp sgt i32 %cond, 50151 br i1 %5, label %if.6, label %if.5.store152 153if.5.store:154 store i32 5, ptr addrspace(1) %out155 br label %end156 157if.6:158 %6 = icmp sgt i32 %cond, 60159 br i1 %6, label %if.7, label %if.6.store160 161if.6.store:162 store i32 6, ptr addrspace(1) %out163 br label %end164 165if.7:166 store i32 7, ptr addrspace(1) %out167 br label %end168 169end:170 ret void171}172 173; BUG64: Applying bug work-around174; BUG32: Applying bug work-around175; NOBUG-NOT: Applying bug work-around176; FUNC-LABEL: {{^}}nested8:177define amdgpu_kernel void @nested8(ptr addrspace(1) %out, i32 %cond) {178entry:179 %0 = icmp sgt i32 %cond, 0180 br i1 %0, label %if.1, label %end181 182if.1:183 %1 = icmp sgt i32 %cond, 10184 br i1 %1, label %if.2, label %if.1.store185 186if.1.store:187 store i32 1, ptr addrspace(1) %out188 br label %end189 190if.2:191 %2 = icmp sgt i32 %cond, 20192 br i1 %2, label %if.3, label %if.2.store193 194if.2.store:195 store i32 2, ptr addrspace(1) %out196 br label %end197 198if.3:199 %3 = icmp sgt i32 %cond, 30200 br i1 %3, label %if.4, label %if.3.store201 202if.3.store:203 store i32 3, ptr addrspace(1) %out204 br label %end205 206if.4:207 %4 = icmp sgt i32 %cond, 40208 br i1 %4, label %if.5, label %if.4.store209 210if.4.store:211 store i32 4, ptr addrspace(1) %out212 br label %end213 214if.5:215 %5 = icmp sgt i32 %cond, 50216 br i1 %5, label %if.6, label %if.5.store217 218if.5.store:219 store i32 5, ptr addrspace(1) %out220 br label %end221 222if.6:223 %6 = icmp sgt i32 %cond, 60224 br i1 %6, label %if.7, label %if.6.store225 226if.6.store:227 store i32 6, ptr addrspace(1) %out228 br label %end229 230if.7:231 %7 = icmp sgt i32 %cond, 70232 br i1 %7, label %if.8, label %if.7.store233 234if.7.store:235 store i32 7, ptr addrspace(1) %out236 br label %end237 238if.8:239 store i32 8, ptr addrspace(1) %out240 br label %end241 242end:243 ret void244}245