Back to PBT run
output.generic.mlir
#loop_annotation = #llvm.loop_annotation<mustProgress = true>
"builtin.module"() ({
"llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<i32 (i1, i32)>, linkage = #llvm.linkage<external>, sym_name = "weighted_then_cycle_0", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
^bb0(%arg12: i1, %arg13: i32):
%13 = "arith.constant"() <{value = 0 : i32}> : () -> i32
%14 = "arith.constant"() <{value = 1 : i32}> : () -> i32
"cf.cond_br"(%arg12)[^bb1, ^bb2] <{branch_weights = array<i32: 4, 6>, operandSegmentSizes = array<i32: 1, 0, 0>}> : (i1) -> ()
^bb1: // pred: ^bb0
"cf.br"(%13)[^bb3] : (i32) -> ()
^bb2: // pred: ^bb0
"cf.br"(%14)[^bb3] : (i32) -> ()
^bb3(%15: i32): // 2 preds: ^bb1, ^bb2
%16 = "llvm.mlir.undef"() : () -> i32
%17 = "arith.constant"() <{value = 1 : i32}> : () -> i32
%18 = "arith.constant"() <{value = 0 : i32}> : () -> i32
%19:2 = "scf.while"(%15, %16) ({
^bb0(%arg16: i32, %arg17: i32):
%20 = "arith.cmpi"(%arg16, %arg13) <{predicate = 0 : i64}> : (i32, i32) -> i1
%21:4 = "scf.if"(%20) ({
"scf.yield"(%16, %arg16, %17, %18) : (i32, i32, i32, i32) -> ()
}, {
%23 = "arith.addi"(%arg16, %14) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
"scf.yield"(%23, %16, %18, %17) : (i32, i32, i32, i32) -> ()
}) : (i1) -> (i32, i32, i32, i32)
%22 = "arith.trunci"(%21#3) <{overflowFlags = #arith.overflow<none>}> : (i32) -> i1
"scf.condition"(%22, %21#0, %21#1) : (i1, i32, i32) -> ()
}, {
^bb0(%arg14: i32, %arg15: i32):
"scf.yield"(%arg14, %arg15) : (i32, i32) -> ()
}) {llvm.loop_annotation = #loop_annotation} : (i32, i32) -> (i32, i32)
"cf.br"()[^bb4] : () -> ()
^bb4: // pred: ^bb3
"llvm.return"(%19#1) : (i32) -> ()
}) : () -> ()
"llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<i32 (i1, i1, i32, i32)>, linkage = #llvm.linkage<external>, sym_name = "nested_weighted_arm_1", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
^bb0(%arg8: i1, %arg9: i1, %arg10: i32, %arg11: i32):
"cf.cond_br"(%arg8)[^bb1, ^bb2] <{branch_weights = array<i32: 1, 9>, operandSegmentSizes = array<i32: 1, 0, 0>}> : (i1) -> ()
^bb1: // pred: ^bb0
%10 = "arith.constant"() <{value = 0 : i32}> : () -> i32
%11 = "scf.if"(%arg9) ({
"scf.yield"(%arg10) : (i32) -> ()
}, {
"scf.yield"(%arg11) : (i32) -> ()
}) : (i1) -> i32
"cf.br"(%11)[^bb3] : (i32) -> ()
^bb2: // pred: ^bb0
"cf.br"(%arg11)[^bb3] : (i32) -> ()
^bb3(%12: i32): // 2 preds: ^bb1, ^bb2
"llvm.return"(%12) : (i32) -> ()
}) : () -> ()
"llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<i32 (i1, i1, i32, i32)>, linkage = #llvm.linkage<external>, sym_name = "sequential_diamonds_2", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
^bb0(%arg4: i1, %arg5: i1, %arg6: i32, %arg7: i32):
%5 = "arith.constant"() <{value = 0 : i32}> : () -> i32
%6 = "arith.constant"() <{value = 3 : i32}> : () -> i32
%7 = "scf.if"(%arg4) ({
"scf.yield"(%arg6) : (i32) -> ()
}, {
"scf.yield"(%arg7) : (i32) -> ()
}) : (i1) -> i32
%8 = "scf.if"(%arg5) ({
%9 = "arith.addi"(%7, %6) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
"scf.yield"(%9) : (i32) -> ()
}, {
"scf.yield"(%7) : (i32) -> ()
}) : (i1) -> i32
"llvm.return"(%8) : (i32) -> ()
}) : () -> ()
"llvm.func"() <{CConv = #llvm.cconv<ccc>, function_type = !llvm.func<i32 (i1, i1, i32, i32)>, linkage = #llvm.linkage<external>, sym_name = "sequential_diamonds_3", unnamed_addr = 0 : i64, visibility_ = 0 : i64}> ({
^bb0(%arg0: i1, %arg1: i1, %arg2: i32, %arg3: i32):
%0 = "arith.constant"() <{value = 0 : i32}> : () -> i32
%1 = "arith.constant"() <{value = 4 : i32}> : () -> i32
%2 = "scf.if"(%arg0) ({
"scf.yield"(%arg2) : (i32) -> ()
}, {
"scf.yield"(%arg3) : (i32) -> ()
}) : (i1) -> i32
%3 = "scf.if"(%arg1) ({
%4 = "arith.addi"(%2, %1) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
"scf.yield"(%4) : (i32) -> ()
}, {
"scf.yield"(%2) : (i32) -> ()
}) : (i1) -> i32
"llvm.return"(%3) : (i32) -> ()
}) : () -> ()
}) : () -> ()