1 // RUN: fir-opt --target-rewrite %s | FileCheck %s --check-prefixes=ALL_MLIR,UNCHANGED_MLIR
2 // RUN: fir-opt --target-rewrite="target-features=+gfx9-insts,+wavefrontsize64" %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-features=+gfx9-insts,+wavefrontsize64 %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_features = #llvm.target_features<[
13 // UNCHANGED_MLIR-SAME: "+sse"
14 // CHANGED_MLIR-SAME: "+gfx9-insts", "+wavefrontsize64"
18 // ALL_MLIR: func.func @dummyfunc() attributes {
19 // ALL_MLIR-SAME: target_features = #llvm.target_features<[
21 // UNCHANGED_MLIR-SAME: "+sse"
22 // CHANGED_MLIR-SAME: "+gfx9-insts", "+wavefrontsize64"
27 // Check LLVM output from the 'tco' tool
29 // ALL_LLVM: define void @dummyfunc() #[[ATTRS:.*]] {
30 // ALL_LLVM: attributes #[[ATTRS]] = {
32 // UNCHANGED_LLVM-SAME: "target-features"="+sse"
33 // CHANGED_LLVM-SAME: "target-features"="+gfx9-insts,+wavefrontsize64"
35 module attributes {fir.target_features = #llvm.target_features<["+sse"]>} {
36 func.func @dummyfunc() -> () {