Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Dialect/SCF/canonicalize.mlir
Show First 20 Lines • Show All 244 Lines • ▼ Show 20 Lines | func @empty_if2(%cond: i1) { | ||||
} | } | ||||
return | return | ||||
} | } | ||||
// CHECK-LABEL: func @empty_if2 | // CHECK-LABEL: func @empty_if2 | ||||
// CHECK-NOT: scf.if | // CHECK-NOT: scf.if | ||||
// CHECK: return | // CHECK: return | ||||
// ---- | // ----- | ||||
func @empty_else(%cond: i1, %v : memref<i1>) { | func @empty_else(%cond: i1, %v : memref<i1>) { | ||||
scf.if %cond { | scf.if %cond { | ||||
memref.store %cond, %v[] : memref<i1> | memref.store %cond, %v[] : memref<i1> | ||||
} else { | } else { | ||||
} | } | ||||
return | return | ||||
} | } | ||||
▲ Show 20 Lines • Show All 764 Lines • Show Last 20 Lines |