1 // RUN: fir-opt --target-rewrite %s | FileCheck %s --check-prefixes=ALL_MLIR,UNCHANGED_MLIR
2 // RUN: fir-opt --target-rewrite="target-cpu=gfx90a" %s | FileCheck %s --check-prefixes=ALL_MLIR,CHANGED_MLIR
4 // RUN: tco %s | FileCheck %s --check-prefixes=ALL_LLVM,UNCHANGED_LLVM
5 // RUN: tco -target-cpu=gfx90a %s | FileCheck %s --check-prefixes=ALL_LLVM,CHANGED_LLVM
8 // Check MLIR output from the 'fir-opt' tool
10 // ALL_MLIR: module attributes {
11 // ALL_MLIR-SAME: fir.target_cpu =
13 // UNCHANGED_MLIR-SAME: "x86_64"
14 // CHANGED_MLIR-SAME: "gfx90a"
16 // ALL_MLIR: func.func @dummyfunc() attributes {
17 // ALL_MLIR-SAME: target_cpu =
19 // UNCHANGED_MLIR-SAME: "x86_64"
20 // CHANGED_MLIR-SAME: "gfx90a"
23 // Check LLVM output from the 'tco' tool
25 // ALL_LLVM: define void @dummyfunc() #[[ATTRS:.*]] {
26 // ALL_LLVM: attributes #[[ATTRS]] = {
28 // UNCHANGED_LLVM-SAME: "target-cpu"="x86_64"
29 // CHANGED_LLVM-SAME: "target-cpu"="gfx90a"
31 module attributes {fir.target_cpu = "x86_64"} {
32 func.func @dummyfunc() -> () {