332 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn -mcpu=bonaire -stop-after=amdgpu-remove-incompatible-functions\3; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX7,IR %s4; RUN: FileCheck --check-prefix=WARN-GFX7 %s < %t5; RUN: llc -mtriple=amdgcn -mcpu=bonaire < %s6 7; RUN: llc -enable-new-pm -mtriple=amdgcn -mcpu=bonaire -stop-after=amdgpu-remove-incompatible-functions\8; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX7,IR %s9; RUN: FileCheck --check-prefix=WARN-GFX7 %s < %t10 11; RUN: llc -mtriple=amdgcn -mcpu=fiji -stop-after=amdgpu-remove-incompatible-functions\12; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX8,IR %s13; RUN: FileCheck --check-prefix=WARN-GFX8 %s < %t14; RUN: llc -mtriple=amdgcn -mcpu=fiji < %s15 16; RUN: llc -enable-new-pm -mtriple=amdgcn -mcpu=fiji -stop-after=amdgpu-remove-incompatible-functions\17; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX8,IR %s18; RUN: FileCheck --check-prefix=WARN-GFX8 %s < %t19 20; RUN: llc -mtriple=amdgcn -mcpu=gfx906 -stop-after=amdgpu-remove-incompatible-functions\21; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX9,GFX906,IR %s22; RUN: FileCheck --check-prefix=WARN-GFX906 %s < %t23; RUN: llc -mtriple=amdgcn -mcpu=gfx906 < %s24 25; RUN: llc -mtriple=amdgcn -mcpu=gfx90a -stop-after=amdgpu-remove-incompatible-functions\26; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX9,GFX90A,IR %s27; RUN: FileCheck --check-prefix=WARN-GFX90A %s < %t28; RUN: llc -mtriple=amdgcn -mcpu=gfx90a < %s29 30; RUN: llc -mtriple=amdgcn -mcpu=gfx1011 -stop-after=amdgpu-remove-incompatible-functions\31; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX10,IR %s32; RUN: FileCheck --check-prefix=WARN-GFX10 %s < %t33; RUN: llc -mtriple=amdgcn -mcpu=gfx1011 < %s34 35; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -stop-after=amdgpu-remove-incompatible-functions\36; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX11,IR %s37; RUN: FileCheck --check-prefix=WARN-GFX11 %s < %t38; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 < %s39 40; Note: This test checks the IR, but also has a run line to codegen the file just to check we41; do not crash when trying to select those functions.42 43; WARN-GFX7: removing function 'needs_dpp': +dpp is not supported on the current target44; WARN-GFX7: removing function 'needs_16bit_insts': +16-bit-insts is not supported on the current target45; WARN-GFX7: removing function 'needs_gfx8_insts': +gfx8-insts is not supported on the current target46; WARN-GFX7: removing function 'needs_gfx9_insts': +gfx9-insts is not supported on the current target47; WARN-GFX7: removing function 'needs_gfx10_insts': +gfx10-insts is not supported on the current target48; WARN-GFX7: removing function 'needs_gfx11_insts': +gfx11-insts is not supported on the current target49; WARN-GFX7: removing function 'needs_dot1_insts': +dot1-insts is not supported on the current target50; WARN-GFX7: removing function 'needs_dot2_insts': +dot2-insts is not supported on the current target51; WARN-GFX7: removing function 'needs_dot3_insts': +dot3-insts is not supported on the current target52; WARN-GFX7: removing function 'needs_dot4_insts': +dot4-insts is not supported on the current target53; WARN-GFX7: removing function 'needs_dot5_insts': +dot5-insts is not supported on the current target54; WARN-GFX7: removing function 'needs_dot6_insts': +dot6-insts is not supported on the current target55; WARN-GFX7: removing function 'needs_dot7_insts': +dot7-insts is not supported on the current target56; WARN-GFX7: removing function 'needs_dot8_insts': +dot8-insts is not supported on the current target57; WARN-GFX7-NOT: not supported58 59; WARN-GFX8: removing function 'needs_gfx9_insts': +gfx9-insts is not supported on the current target60; WARN-GFX8: removing function 'needs_gfx10_insts': +gfx10-insts is not supported on the current target61; WARN-GFX8: removing function 'needs_gfx11_insts': +gfx11-insts is not supported on the current target62; WARN-GFX8: removing function 'needs_dot1_insts': +dot1-insts is not supported on the current target63; WARN-GFX8: removing function 'needs_dot2_insts': +dot2-insts is not supported on the current target64; WARN-GFX8: removing function 'needs_dot3_insts': +dot3-insts is not supported on the current target65; WARN-GFX8: removing function 'needs_dot4_insts': +dot4-insts is not supported on the current target66; WARN-GFX8: removing function 'needs_dot5_insts': +dot5-insts is not supported on the current target67; WARN-GFX8: removing function 'needs_dot6_insts': +dot6-insts is not supported on the current target68; WARN-GFX8: removing function 'needs_dot7_insts': +dot7-insts is not supported on the current target69; WARN-GFX8: removing function 'needs_dot8_insts': +dot8-insts is not supported on the current target70; WARN-GFX8-NOT: not supported71 72; WARN-GFX906: removing function 'needs_gfx10_insts': +gfx10-insts is not supported on the current target73; WARN-GFX906: removing function 'needs_gfx11_insts': +gfx11-insts is not supported on the current target74; WARN-GFX906: removing function 'needs_dot3_insts': +dot3-insts is not supported on the current target75; WARN-GFX906: removing function 'needs_dot4_insts': +dot4-insts is not supported on the current target76; WARN-GFX906: removing function 'needs_dot5_insts': +dot5-insts is not supported on the current target77; WARN-GFX906: removing function 'needs_dot6_insts': +dot6-insts is not supported on the current target78; WARN-GFX906: removing function 'needs_dot8_insts': +dot8-insts is not supported on the current target79; WARN-GFX906-NOT: not supported80 81; WARN-GFX90A: removing function 'needs_gfx10_insts': +gfx10-insts is not supported on the current target82; WARN-GFX90A: removing function 'needs_gfx11_insts': +gfx11-insts is not supported on the current target83; WARN-GFX90A: removing function 'needs_dot8_insts': +dot8-insts is not supported on the current target84; WARN-GFX90A-NOT: not supported85 86; WARN-GFX10: removing function 'needs_gfx11_insts': +gfx11-insts is not supported on the current target87; WARN-GFX10: removing function 'needs_dot3_insts': +dot3-insts is not supported on the current target88; WARN-GFX10: removing function 'needs_dot4_insts': +dot4-insts is not supported on the current target89; WARN-GFX10: removing function 'needs_dot8_insts': +dot8-insts is not supported on the current target90; WARN-GFX10-NOT: not supported91 92; WARN-GFX11: removing function 'needs_dot1_insts': +dot1-insts is not supported on the current target93; WARN-GFX11: removing function 'needs_dot2_insts': +dot2-insts is not supported on the current target94; WARN-GFX11: removing function 'needs_dot3_insts': +dot3-insts is not supported on the current target95; WARN-GFX11: removing function 'needs_dot4_insts': +dot4-insts is not supported on the current target96; WARN-GFX11: removing function 'needs_dot6_insts': +dot6-insts is not supported on the current target97; WARN-GFX11-NOT: not supported98 99; GFX7: @GVRefs {{.*}} zeroinitializer100; GFX8: @GVRefs {{.*}} [ptr @needs_dpp, ptr @needs_16bit_insts, ptr @needs_gfx8_insts, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null, ptr null]101; GFX906: @GVRefs {{.*}} [ptr @needs_dpp, ptr @needs_16bit_insts, ptr @needs_gfx8_insts, ptr @needs_gfx9_insts, ptr null, ptr null, ptr @needs_dot1_insts, ptr @needs_dot2_insts, ptr null, ptr null, ptr null, ptr null, ptr @needs_dot7_insts, ptr null]102; GFX90A: @GVRefs {{.*}} [ptr @needs_dpp, ptr @needs_16bit_insts, ptr @needs_gfx8_insts, ptr @needs_gfx9_insts, ptr null, ptr null, ptr @needs_dot1_insts, ptr @needs_dot2_insts, ptr @needs_dot3_insts, ptr @needs_dot4_insts, ptr @needs_dot5_insts, ptr @needs_dot6_insts, ptr @needs_dot7_insts, ptr null]103; GFX10: @GVRefs {{.*}} [ptr @needs_dpp, ptr @needs_16bit_insts, ptr @needs_gfx8_insts, ptr @needs_gfx9_insts, ptr @needs_gfx10_insts, ptr null, ptr @needs_dot1_insts, ptr @needs_dot2_insts, ptr null, ptr null, ptr @needs_dot5_insts, ptr @needs_dot6_insts, ptr @needs_dot7_insts, ptr null]104; GFX11: @GVRefs {{.*}} [ptr @needs_dpp, ptr @needs_16bit_insts, ptr @needs_gfx8_insts, ptr @needs_gfx9_insts, ptr @needs_gfx10_insts, ptr @needs_gfx11_insts, ptr null, ptr null, ptr null, ptr null, ptr @needs_dot5_insts, ptr null, ptr @needs_dot7_insts, ptr @needs_dot8_insts]105@GVRefs = internal global [14 x ptr] [106 ptr @needs_dpp,107 ptr @needs_16bit_insts,108 ptr @needs_gfx8_insts,109 ptr @needs_gfx9_insts,110 ptr @needs_gfx10_insts,111 ptr @needs_gfx11_insts,112 ptr @needs_dot1_insts,113 ptr @needs_dot2_insts,114 ptr @needs_dot3_insts,115 ptr @needs_dot4_insts,116 ptr @needs_dot5_insts,117 ptr @needs_dot6_insts,118 ptr @needs_dot7_insts,119 ptr @needs_dot8_insts120]121 122; GFX7: @ConstantExpr = internal global i64 0123@ConstantExpr = internal global i64 ptrtoint (ptr @needs_dpp to i64)124 125define void @needs_dpp(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #0 {126entry:127 %cmp = icmp eq i64 %a, 0128 br i1 %cmp, label %if, label %else129 130if:131 %ld = load i64, ptr %in132 br label %endif133 134else:135 %add = add i64 %a, %b136 br label %endif137 138endif:139 %phi = phi i64 [%ld, %if], [%add, %else]140 store i64 %phi, ptr %out141 ret void142}143 144define void @needs_16bit_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #1 {145entry:146 %cmp = icmp eq i64 %a, 0147 br i1 %cmp, label %if, label %else148 149if:150 %ld = load i64, ptr %in151 br label %endif152 153else:154 %add = add i64 %a, %b155 br label %endif156 157endif:158 %phi = phi i64 [%ld, %if], [%add, %else]159 store i64 %phi, ptr %out160 ret void161}162 163define void @needs_gfx8_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #2 {164entry:165 %cmp = icmp eq i64 %a, 0166 br i1 %cmp, label %if, label %else167 168if:169 %ld = load i64, ptr %in170 br label %endif171 172else:173 %add = add i64 %a, %b174 br label %endif175 176endif:177 %phi = phi i64 [%ld, %if], [%add, %else]178 store i64 %phi, ptr %out179 ret void180}181 182define void @needs_gfx9_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #3 {183entry:184 %cmp = icmp eq i64 %a, 0185 br i1 %cmp, label %if, label %else186 187if:188 %ld = load i64, ptr %in189 br label %endif190 191else:192 %add = add i64 %a, %b193 br label %endif194 195endif:196 %phi = phi i64 [%ld, %if], [%add, %else]197 store i64 %phi, ptr %out198 ret void199}200 201define void @needs_gfx10_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #4 {202entry:203 %cmp = icmp eq i64 %a, 0204 br i1 %cmp, label %if, label %else205 206if:207 %ld = load i64, ptr %in208 br label %endif209 210else:211 %add = add i64 %a, %b212 br label %endif213 214endif:215 %phi = phi i64 [%ld, %if], [%add, %else]216 store i64 %phi, ptr %out217 ret void218}219 220define void @needs_gfx11_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #5 {221entry:222 %cmp = icmp eq i64 %a, 0223 br i1 %cmp, label %if, label %else224 225if:226 %ld = load i64, ptr %in227 br label %endif228 229else:230 %add = add i64 %a, %b231 br label %endif232 233endif:234 %phi = phi i64 [%ld, %if], [%add, %else]235 store i64 %phi, ptr %out236 ret void237}238 239define void @needs_dot1_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #6 {240 %add = add i64 %a, %b241 store i64 %add, ptr %out242 ret void243}244 245define void @needs_dot2_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #7 {246 %add = add i64 %a, %b247 store i64 %add, ptr %out248 ret void249}250 251define void @needs_dot3_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #8 {252 %add = add i64 %a, %b253 store i64 %add, ptr %out254 ret void255}256 257 258define void @needs_dot4_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #9 {259 %add = add i64 %a, %b260 store i64 %add, ptr %out261 ret void262}263 264define void @needs_dot5_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #10 {265 %add = add i64 %a, %b266 store i64 %add, ptr %out267 ret void268}269 270define void @needs_dot6_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #11 {271 %add = add i64 %a, %b272 store i64 %add, ptr %out273 ret void274}275 276define void @needs_dot7_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #12 {277 %add = add i64 %a, %b278 store i64 %add, ptr %out279 ret void280}281 282define void @needs_dot8_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) #13 {283 %add = add i64 %a, %b284 store i64 %add, ptr %out285 ret void286}287 288; IR: define void @caller(289define void @caller(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c) {290 call void @needs_dpp(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)291 call void @needs_16bit_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)292 call void @needs_gfx8_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)293 ; GFX111: call void @needs_gfx9_insts(c294 call void @needs_gfx9_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)295 ; GFX111: call void @needs_gfx10_insts(296 call void @needs_gfx10_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)297 call void @needs_gfx11_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)298 call void @needs_dot1_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)299 call void @needs_dot2_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)300 call void @needs_dot3_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)301 call void @needs_dot4_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)302 call void @needs_dot5_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)303 call void @needs_dot6_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)304 call void @needs_dot7_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)305 call void @needs_dot8_insts(ptr %out, ptr %in, i64 %a, i64 %b, i64 %c)306 ret void307}308 309attributes #0 = { "target-features"="+dpp" }310attributes #1 = { "target-features"="+16-bit-insts" }311attributes #2 = { "target-features"="+gfx8-insts" }312attributes #3 = { "target-features"="+gfx9-insts" }313attributes #4 = { "target-features"="+gfx10-insts" }314attributes #5 = { "target-features"="+gfx11-insts" }315attributes #6 = { "target-features"="+dot1-insts" }316attributes #7 = { "target-features"="+dot2-insts" }317attributes #8 = { "target-features"="+dot3-insts" }318attributes #9 = { "target-features"="+dot4-insts" }319attributes #10 = { "target-features"="+dot5-insts" }320attributes #11 = { "target-features"="+dot6-insts" }321attributes #12 = { "target-features"="+dot7-insts" }322attributes #13 = { "target-features"="+dot8-insts" }323;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:324; GFX10: {{.*}}325; GFX11: {{.*}}326; GFX7: {{.*}}327; GFX8: {{.*}}328; GFX9: {{.*}}329; GFX906: {{.*}}330; GFX90A: {{.*}}331; IR: {{.*}}332