56 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=amdgcn -mcpu=gfx1030 -stop-after=amdgpu-remove-incompatible-functions\3; RUN: -pass-remarks=amdgpu-remove-incompatible-functions %s -o - 2>%t | FileCheck -check-prefixes=COMPATIBLE,IR %s4; RUN: FileCheck -allow-empty --check-prefix=WARN-COMPATIBLE %s < %t5; RUN: llc -mtriple=amdgcn -mcpu=gfx1030 < %s6 7; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -stop-after=amdgpu-remove-incompatible-functions\8; RUN: -pass-remarks=amdgpu-remove-incompatible-functions %s -o - 2>%t | FileCheck -check-prefixes=INCOMPATIBLE,IR %s9; RUN: FileCheck --check-prefixes=WARN-INCOMPATIBLE %s < %t10; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 < %s11 12; Note: This test checks the IR, but also has a run line to codegen the file just to check we13; do not crash when trying to select those functions.14 15; WARN-COMPATIBLE-NOT: removing function 'needs_gws':16; WARN-INCOMPATIBLE: removing function 'needs_gws': +gws is not supported on the current target17 18 19; COMPATIBLE: @GVRefs {{.*}} [ptr @needs_gws]20; INCOMPATIBLE: @GVRefs {{.*}} zeroinitializer21@GVRefs = internal global [1 x ptr] [22 ptr @needs_gws23]24 25 26; COMPATIBLE: @ConstantExpr = internal global i64 ptrtoint (ptr @needs_gws to i64)27; INCOMPATIBLE: @ConstantExpr = internal global i64 028@ConstantExpr = internal global i64 ptrtoint (ptr @needs_gws to i64)29 30 31; COMPATIBLE: define void @needs_gws32; INCOMPATIBLE-NOT: define void @needs_gws33define void @needs_gws(i32 %val0, i32 %val1) #0 {34 call void @llvm.amdgcn.ds.gws.init(i32 %val0, i32 %val1)35 call void @llvm.amdgcn.ds.gws.barrier(i32 %val0, i32 %val1)36 ret void37}38 39; IR: define void @gws_caller(40define void @gws_caller(i32 %val0, i32 %val1) {41 call void @needs_gws(i32 %val0, i32 %val1)42 ret void43}44 45declare void @llvm.amdgcn.ds.gws.barrier(i32, i32) #146declare void @llvm.amdgcn.ds.gws.init(i32, i32) #247 48 49attributes #0 = { "target-features"="+gws"}50attributes #1 = { convergent inaccessiblememonly nounwind }51attributes #2 = { convergent inaccessiblememonly nounwind writeonly }52;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:53; COMPATIBLE: {{.*}}54; INCOMPATIBLE: {{.*}}55; IR: {{.*}}56