brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1021 B · c91ff37 Raw
30 lines · plain
1// RUN: yaml2obj %S/inputs/branch_if.yaml.wasm -o - | mlir-translate --import-wasm | FileCheck %s2 3/* Source code used to create this test:4(module5  (type $produce_i32 (func (result i32)))6  (func (type $produce_i32)7    (block $my_block (type $produce_i32)8      i32.const 19      i32.const 210      br_if $my_block11      i32.const 112      i32.add13    )14  )15)16*/17 18// CHECK-LABEL:   wasmssa.func @func_0() -> i32 {19// CHECK:           wasmssa.block : {20// CHECK:             %[[VAL_0:.*]] = wasmssa.const 1 : i3221// CHECK:             %[[VAL_1:.*]] = wasmssa.const 2 : i3222// CHECK:             wasmssa.branch_if %[[VAL_1]] to level 0 with args(%[[VAL_0]] : i32) else ^bb123// CHECK:           ^bb1:24// CHECK:             %[[VAL_2:.*]] = wasmssa.const 1 : i3225// CHECK:             %[[VAL_3:.*]] = wasmssa.add %[[VAL_0]] %[[VAL_2]] : i3226// CHECK:             wasmssa.block_return %[[VAL_3]] : i3227// CHECK:           }> ^bb128// CHECK:         ^bb1(%[[VAL_4:.*]]: i32):29// CHECK:           wasmssa.return %[[VAL_4]] : i3230