35 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=gfx1250 -mattr=+wavefrontsize32 -stop-after=amdgpu-remove-incompatible-functions\2; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX1250 %s3; RUN: FileCheck --check-prefix=WARN-GFX1250 %s < %t4; RUN: llc -mtriple=amdgcn -mcpu=gfx1250 -mattr=+wavefrontsize32 < %s5 6; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize32,-wavefrontsize64 -stop-after=amdgpu-remove-incompatible-functions\7; RUN: -pass-remarks=amdgpu-remove-incompatible-functions < %s 2>%t | FileCheck -check-prefixes=GFX1200 %s8; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -mattr=+wavefrontsize32,-wavefrontsize64 < %s9 10; WARN-GFX1250: removing function 'needs_wavefrontsize64': +wavefrontsize64 is not supported on the current target11; WARN-GFX1250-NOT: not supported12 13define void @needs_wavefrontsize64(ptr %out) #0 {14; GFX1250-NOT: @needs_wavefrontsize6415; GFX1200: define void @needs_wavefrontsize64(16 %1 = tail call i64 @llvm.read_register.i64(metadata !0)17 %2 = tail call i64 @llvm.ctpop.i64(i64 %1)18 store i64 %2, ptr %out, align 419 ret void20}21 22define void @caller(ptr %out) {23 ; GFX1250: call void null(24 ; GFX1200: call void @needs_wavefrontsize64(25 call void @needs_wavefrontsize64(ptr %out)26 ret void27}28 29declare i64 @llvm.read_register.i64(metadata)30declare i64 @llvm.ctpop.i64(i64)31 32!0 = !{!"exec"}33 34attributes #0 = { "target-features"="+wavefrontsize64" }35