llvm-project/mlir/test/AffineOps/ops.mlir

24 lines
477 B
MLIR
Raw Normal View History

// RUN: mlir-opt %s | FileCheck %s
// Check that the attributes for the affine operations are round-tripped.
func @attributes() {
// CHECK: for %i
// CHECK-NEXT: } {some_attr: true}
for %i = 0 to 10 {
} {some_attr: true}
// CHECK: if
// CHECK-NEXT: } {some_attr: true}
affine.if () : () () {
} {some_attr: true}
// CHECK: } else {
// CHECK: } {some_attr: true}
affine.if () : () () {
} else {
"foo"() : () -> ()
} {some_attr: true}
return
}