Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Dialect/OpenACC/canonicalize.mlir
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | func @testupdateop(%a: memref<10xf32>) -> () { | ||||
%ifCond = constant false | %ifCond = constant false | ||||
acc.update if(%ifCond) host(%a: memref<10xf32>) | acc.update if(%ifCond) host(%a: memref<10xf32>) | ||||
return | return | ||||
} | } | ||||
// CHECK: func @testupdateop | // CHECK: func @testupdateop | ||||
// CHECK-NOT: acc.update | // CHECK-NOT: acc.update | ||||
// ---- | // ----- | ||||
func @testenterdataop(%a: memref<10xf32>, %ifCond: i1) -> () { | func @testenterdataop(%a: memref<10xf32>, %ifCond: i1) -> () { | ||||
acc.enter_data if(%ifCond) create(%a: memref<10xf32>) | acc.enter_data if(%ifCond) create(%a: memref<10xf32>) | ||||
return | return | ||||
} | } | ||||
// CHECK: func @testenterdataop(%{{.*}}: memref<10xf32>, [[IFCOND:%.*]]: i1) | // CHECK: func @testenterdataop(%{{.*}}: memref<10xf32>, [[IFCOND:%.*]]: i1) | ||||
// CHECK: acc.enter_data if(%{{.*}}) create(%{{.*}} : memref<10xf32>) | // CHECK: acc.enter_data if(%{{.*}}) create(%{{.*}} : memref<10xf32>) | ||||
Show All 20 Lines |