Skip to content

Commit 683022f

Browse files
committed
Update Flang unit tests
1 parent d96e598 commit 683022f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

flang/test/Lower/target-features.f90 renamed to flang/test/Lower/target-features-amdgcn.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
! REQUIRES: amdgpu-registered-target
12
! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s --check-prefixes=ALL,NONE
23
! RUN: %flang_fc1 -emit-fir -triple amdgcn-amd-amdhsa %s -o - | FileCheck %s --check-prefixes=ALL,TRIPLE
34
! RUN: %flang_fc1 -emit-fir -target-cpu gfx90a %s -o - | FileCheck %s --check-prefixes=ALL,CPU
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
! REQUIRES: x86-registered-target
2+
! RUN: %flang_fc1 -emit-fir -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=ALL,NONE
3+
! RUN: %flang_fc1 -emit-fir -triple x86_64-unknown-linux-gnu -target-cpu x86-64 %s -o - | FileCheck %s --check-prefixes=ALL,CPU
4+
! RUN: %flang_fc1 -emit-fir -triple x86_64-unknown-linux-gnu -target-feature +sse %s -o - | FileCheck %s --check-prefixes=ALL,FEATURE
5+
! RUN: %flang_fc1 -emit-fir -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -target-feature +sse %s -o - | FileCheck %s --check-prefixes=ALL,BOTH
6+
7+
! ALL-LABEL: func.func @_QPfoo()
8+
9+
! NONE-NOT: target_cpu
10+
! NONE-NOT: target_features
11+
12+
! CPU-SAME: target_cpu = "x86-64"
13+
! CPU-NOT: target_features
14+
15+
! FEATURE-NOT: target_cpu
16+
! FEATURE-SAME: target_features = #llvm.target_features<["+sse"]>
17+
18+
! BOTH-SAME: target_cpu = "x86-64"
19+
! BOTH-SAME: target_features = #llvm.target_features<["+sse"]>
20+
subroutine foo
21+
end subroutine

0 commit comments

Comments
 (0)