1 ; RUN: llc -march=amdgcn -mcpu=gfx906 -mattr=+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\
2 ; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX906 %s
3 ; RUN: FileCheck --check-prefix=WARN-GFX906 %s < %t
4 ; RUN: llc -march=amdgcn -mcpu=gfx906 -mattr=+wavefrontsize64 -verify-machineinstrs < %s
6 ; RUN: llc -march=amdgcn -mcpu=gfx90a -mattr=+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\
7 ; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX90A %s
8 ; RUN: FileCheck --check-prefix=WARN-GFX90A %s < %t
9 ; RUN: llc -march=amdgcn -mcpu=gfx90a -mattr=+wavefrontsize64 -verify-machineinstrs < %s
11 ; RUN: llc -march=amdgcn -mcpu=gfx1011 -mattr=+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\
12 ; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX10 %s
13 ; RUN: llc -march=amdgcn -mcpu=gfx1011 -mattr=+wavefrontsize64 -verify-machineinstrs < %s
15 ; RUN: llc -march=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\
16 ; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX11 %s
17 ; RUN: llc -march=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize64 -verify-machineinstrs < %s
19 ; WARN-GFX906: removing function 'needs_wavefrontsize32': +wavefrontsize32 is not supported on the current target
20 ; WARN-GFX906-NOT: not supported
22 ; WARN-GFX90A: removing function 'needs_wavefrontsize32': +wavefrontsize32 is not supported on the current target
23 ; WARN-GFX90A-NOT: not supported
25 define void @needs_wavefrontsize32(ptr %out) #0 {
26 ; GFX906-NOT: @needs_wavefrontsize32
27 ; GFX90A-NOT: @needs_wavefrontsize32
28 ; GFX10: define void @needs_wavefrontsize32(
29 ; GFX11: define void @needs_wavefrontsize32(
30 %1 = tail call i32 @llvm.read_register.i32(metadata !0)
31 %2 = tail call i32 @llvm.ctpop.i32(i32 %1)
32 store i32 %2, ptr %out, align 4
36 define void @caller(ptr %out) {
37 ; GFX906: call void null(
38 ; GFX90A: call void null(
39 ; GFX10: call void @needs_wavefrontsize32(
40 ; GFX11: call void @needs_wavefrontsize32(
41 call void @needs_wavefrontsize32(ptr %out)
45 declare i32 @llvm.read_register.i32(metadata)
46 declare i32 @llvm.ctpop.i32(i32)
50 attributes #0 = { "target-features"="+wavefrontsize32" }