57 lines · plain
1; RUN: llc -mtriple=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 %s3; RUN: FileCheck --check-prefix=WARN-GFX906 %s < %t4; RUN: llc -mtriple=amdgcn -mcpu=gfx906 -mattr=+wavefrontsize64 < %s5 6; RUN: llc -mtriple=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 %s8; RUN: FileCheck --check-prefix=WARN-GFX90A %s < %t9; RUN: llc -mtriple=amdgcn -mcpu=gfx90a -mattr=+wavefrontsize64 < %s10 11; RUN: llc -mtriple=amdgcn -mcpu=gfx1011 -mattr=-wavefrontsize32,+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\12; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX10 %s13; RUN: llc -mtriple=amdgcn -mcpu=gfx1011 -mattr=-wavefrontsize32,+wavefrontsize64 < %s14 15; RUN: llc -enable-new-pm -mtriple=amdgcn -mcpu=gfx1011 -mattr=-wavefrontsize32,+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\16; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX10 %s17 18; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\19; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX11 %s20; RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 < %s21 22; RUN: llc -enable-new-pm -mtriple=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\23; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX11 %s24 25; WARN-GFX906: removing function 'needs_wavefrontsize32': +wavefrontsize32 is not supported on the current target26; WARN-GFX906-NOT: not supported27 28; WARN-GFX90A: removing function 'needs_wavefrontsize32': +wavefrontsize32 is not supported on the current target29; WARN-GFX90A-NOT: not supported30 31define void @needs_wavefrontsize32(ptr %out) #0 {32; GFX906-NOT: @needs_wavefrontsize3233; GFX90A-NOT: @needs_wavefrontsize3234; GFX10: define void @needs_wavefrontsize32(35; GFX11: define void @needs_wavefrontsize32(36 %1 = tail call i32 @llvm.read_register.i32(metadata !0)37 %2 = tail call i32 @llvm.ctpop.i32(i32 %1)38 store i32 %2, ptr %out, align 439 ret void40}41 42define void @caller(ptr %out) {43 ; GFX906: call void null(44 ; GFX90A: call void null(45 ; GFX10: call void @needs_wavefrontsize32(46 ; GFX11: call void @needs_wavefrontsize32(47 call void @needs_wavefrontsize32(ptr %out)48 ret void49}50 51declare i32 @llvm.read_register.i32(metadata)52declare i32 @llvm.ctpop.i32(i32)53 54!0 = !{!"exec_lo"}55 56attributes #0 = { "target-features"="+wavefrontsize32" }57