brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1017 B · 8450aaf Raw
36 lines · plain
1// RUN: fir-opt --target-rewrite %s | FileCheck %s --check-prefixes=ALL_MLIR,UNCHANGED_MLIR2// RUN: fir-opt --target-rewrite="target-cpu=gfx90a" %s | FileCheck %s --check-prefixes=ALL_MLIR,CHANGED_MLIR3 4// RUN: tco %s | FileCheck %s --check-prefixes=ALL_LLVM,UNCHANGED_LLVM5// RUN: tco -target-cpu=gfx90a %s | FileCheck %s --check-prefixes=ALL_LLVM,CHANGED_LLVM6 7 8// Check MLIR output from the 'fir-opt' tool9 10// ALL_MLIR: module attributes {11// ALL_MLIR-SAME: fir.target_cpu =12 13// UNCHANGED_MLIR-SAME: "x86_64"14// CHANGED_MLIR-SAME: "gfx90a"15 16// ALL_MLIR: func.func @dummyfunc() attributes {17// ALL_MLIR-SAME: target_cpu =18 19// UNCHANGED_MLIR-SAME: "x86_64"20// CHANGED_MLIR-SAME: "gfx90a"21 22 23// Check LLVM output from the 'tco' tool24 25// ALL_LLVM: define void @dummyfunc() #[[ATTRS:.*]] {26// ALL_LLVM: attributes #[[ATTRS]] = {27 28// UNCHANGED_LLVM-SAME: "target-cpu"="x86_64"29// CHANGED_LLVM-SAME: "target-cpu"="gfx90a"30 31module attributes {fir.target_cpu = "x86_64"}  {32  func.func @dummyfunc() -> () {33    return34  }35}36