mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 04:46:37 +00:00

Previously, some of these lowering tests inadvertently relied on a default triple not introducing any target features. This caused failures when compiling on a ppc64le-linux-unknown-gnu system. This patch updates these lowering tests to always explicitly set the target triple and check that the -target-cpu and -target-features compiler options are processed as expected.
23 lines
897 B
Fortran
23 lines
897 B
Fortran
! REQUIRES: amdgpu-registered-target
|
|
! RUN: %flang_fc1 -emit-fir -triple amdgcn-amd-amdhsa -target-cpu gfx90a %s -o - | FileCheck %s --check-prefixes=ALL,CPU
|
|
! RUN: %flang_fc1 -emit-fir -triple amdgcn-amd-amdhsa -target-feature +sse %s -o - | FileCheck %s --check-prefixes=ALL,FEATURE
|
|
! RUN: %flang_fc1 -emit-fir -triple amdgcn-amd-amdhsa -target-cpu gfx90a -target-feature +sse %s -o - | FileCheck %s --check-prefixes=ALL,BOTH
|
|
|
|
! ALL: module attributes {
|
|
|
|
! CPU-SAME: fir.target_cpu = "gfx90a"
|
|
! CPU-SAME: fir.target_features = #llvm.target_features<[
|
|
! CPU-SAME: "+gfx90a-insts"
|
|
! CPU-SAME: ]>
|
|
|
|
! FEATURE-SAME: fir.target_features = #llvm.target_features<[
|
|
! FEATURE-NOT: "+gfx90a-insts"
|
|
! FEATURE-SAME: "+sse"
|
|
! FEATURE-SAME: ]>
|
|
|
|
! BOTH-SAME: fir.target_cpu = "gfx90a"
|
|
! BOTH-SAME: fir.target_features = #llvm.target_features<[
|
|
! BOTH-SAME: "+gfx90a-insts"
|
|
! BOTH-SAME: "+sse"
|
|
! BOTH-SAME: ]>
|