Skip to content

Commit 0d8be7c

Browse files
committed
Fix tests
1 parent 63ba1c0 commit 0d8be7c

File tree

2 files changed

+13
-26
lines changed

2 files changed

+13
-26
lines changed
Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
!REQUIRES: amdgpu-registered-target, nvptx-registered-target
22
!RUN: %flang_fc1 -emit-fir -triple amdgcn-amd-amdhsa -target-cpu gfx908 -fopenmp -fopenmp-is-target-device %s -o - | FileCheck --check-prefix=AMDGCN %s
3-
!RUN: %flang_fc1 -emit-hlfir -triple nvptx64-nvidia-cuda -target-cpu sm_80 -fopenmp -fopenmp-is-target-device %s -o - | FileCheck --check-prefix=NVPTX %s
4-
3+
!RUN: %flang_fc1 -emit-fir -triple nvptx64-nvidia-cuda -target-cpu sm_80 -fopenmp -fopenmp-is-target-device %s -o - | FileCheck --check-prefix=NVPTX %s
54

65
!===============================================================================
76
! Target_Enter Simple
87
!===============================================================================
98

10-
!AMDGCN-LABEL: func.func @_QPomp_target_simple() attributes {
11-
!AMDGCN-SAME: target_cpu = "gfx908"
12-
!AMDGCN-SAME: target_features = #llvm.target_features<["+16-bit-insts", "+ci-insts",
9+
!AMDGCN: module attributes {
10+
!AMDGCN-SAME: fir.target_cpu = "gfx908"
11+
!AMDGCN-SAME: fir.target_features = #llvm.target_features<["+16-bit-insts", "+ci-insts",
1312
!AMDGCN-SAME: "+dl-insts", "+dot1-insts", "+dot10-insts", "+dot2-insts", "+dot3-insts",
1413
!AMDGCN-SAME: "+dot4-insts", "+dot5-insts", "+dot6-insts", "+dot7-insts", "+dpp",
1514
!AMDGCN-SAME: "+gfx8-insts", "+gfx9-insts", "+gws", "+image-insts", "+mai-insts",
1615
!AMDGCN-SAME: "+s-memrealtime", "+s-memtime-inst", "+wavefrontsize64"]>
1716

18-
!NVPTX-LABEL: func.func @_QPomp_target_simple() attributes {
19-
!NVPTX-SAME: target_cpu = "sm_80"
20-
!NVPTX-SAME: target_features = #llvm.target_features<["+ptx61", "+sm_80"]>
21-
22-
subroutine omp_target_simple
23-
! Directive needed to prevent subroutine from being filtered out when
24-
! compiling for the device.
25-
!$omp declare target
26-
end subroutine omp_target_simple
17+
!NVPTX: module attributes {
18+
!NVPTX-SAME: fir.target_cpu = "sm_80"
19+
!NVPTX-SAME: fir.target_features = #llvm.target_features<["+ptx61", "+sm_80"]>

flang/test/Lower/OpenMP/target_cpu_features.f90

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,14 @@
66
! Target_Enter Simple
77
!===============================================================================
88

9-
!AMDGCN-LABEL: func.func @_QPomp_target_simple() attributes {
10-
!AMDGCN-SAME: target_cpu = "gfx908"
11-
!AMDGCN-SAME: target_features = #llvm.target_features<["+16-bit-insts", "+ci-insts",
9+
!AMDGCN: module attributes {
10+
!AMDGCN-SAME: fir.target_cpu = "gfx908"
11+
!AMDGCN-SAME: fir.target_features = #llvm.target_features<["+16-bit-insts", "+ci-insts",
1212
!AMDGCN-SAME: "+dl-insts", "+dot1-insts", "+dot10-insts", "+dot2-insts", "+dot3-insts",
1313
!AMDGCN-SAME: "+dot4-insts", "+dot5-insts", "+dot6-insts", "+dot7-insts", "+dpp",
1414
!AMDGCN-SAME: "+gfx8-insts", "+gfx9-insts", "+gws", "+image-insts", "+mai-insts",
1515
!AMDGCN-SAME: "+s-memrealtime", "+s-memtime-inst", "+wavefrontsize64"]>
1616

17-
!NVPTX-LABEL: func.func @_QPomp_target_simple() attributes {
18-
!NVPTX-SAME: target_cpu = "sm_80"
19-
!NVPTX-SAME: target_features = #llvm.target_features<["+ptx61", "+sm_80"]>
20-
21-
subroutine omp_target_simple
22-
! Directive needed to prevent subroutine from being filtered out when
23-
! compiling for the device.
24-
!$omp declare target
25-
end subroutine omp_target_simple
17+
!NVPTX: module attributes {
18+
!NVPTX-SAME: fir.target_cpu = "sm_80"
19+
!NVPTX-SAME: fir.target_features = #llvm.target_features<["+ptx61", "+sm_80"]>

0 commit comments

Comments
 (0)