1 ! RUN: %if aarch64-registered-target %{ %flang_fc1 -emit-fir -triple aarch64-unknown-linux-gnu -target-cpu aarch64 %s -o - | FileCheck %s --check-prefixes=ALL,ARMCPU %}
2 ! RUN: %if aarch64-registered-target %{ %flang_fc1 -emit-fir -triple aarch64-unknown-linux-gnu -tune-cpu neoverse-n1 %s -o - | FileCheck %s --check-prefixes=ALL,ARMTUNE %}
3 ! RUN: %if aarch64-registered-target %{ %flang_fc1 -emit-fir -triple aarch64-unknown-linux-gnu -target-cpu aarch64 -tune-cpu neoverse-n1 %s -o - | FileCheck %s --check-prefixes=ALL,ARMBOTH %}
5 ! RUN: %if x86-registered-target %{ %flang_fc1 -emit-fir -triple x86_64-unknown-linux-gnu -target-cpu x86-64 %s -o - | FileCheck %s --check-prefixes=ALL,X86CPU %}
6 ! RUN: %if x86-registered-target %{ %flang_fc1 -emit-fir -triple x86_64-unknown-linux-gnu -tune-cpu pentium4 %s -o - | FileCheck %s --check-prefixes=ALL,X86TUNE %}
7 ! RUN: %if x86-registered-target %{ %flang_fc1 -emit-fir -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -tune-cpu pentium4 %s -o - | FileCheck %s --check-prefixes=ALL,X86BOTH %}
9 ! ALL: module attributes {
11 ! ARMCPU-SAME: fir.target_cpu = "aarch64"
12 ! ARMCPU-NOT: fir.tune_cpu = "neoverse-n1"
14 ! ARMTUNE-SAME: fir.tune_cpu = "neoverse-n1"
16 ! ARMBOTH-SAME: fir.target_cpu = "aarch64"
17 ! ARMBOTH-SAME: fir.tune_cpu = "neoverse-n1"
19 ! X86CPU-SAME: fir.target_cpu = "x86-64"
20 ! X86CPU-NOT: fir.tune_cpu = "pentium4"
22 ! X86TUNE-SAME: fir.tune_cpu = "pentium4"
24 ! X86BOTH-SAME: fir.target_cpu = "x86-64"
25 ! X86BOTH-SAME: fir.tune_cpu = "pentium4"