brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 1915324 Raw
32 lines · plain
1// RUN: mlir-opt %s --pass-pipeline="builtin.module(test-irdl-conversion-check)" | FileCheck %s2// CHECK-LABEL: module {3module {4    // CHECK: func.func @test(%[[test_arg:[^ ]*]]: i1) {5    // CHECK: %[[v0:[^ ]*]] = "test_irdl_to_cpp.bar"() : () -> i326    // CHECK: %[[v1:[^ ]*]] = "test_irdl_to_cpp.bar"() : () -> i327    // CHECK: %[[v2:[^ ]*]] = "test_irdl_to_cpp.hash"(%[[v0]], %[[v0]]) : (i32, i32) -> i328    // CHECK: scf.if %[[test_arg]]9    // CHECK: return10    // CHECK: }11    func.func @test(%test_arg: i1) {12        %0 = "test_irdl_to_cpp.bar"() : () -> i3213        %1 = "test_irdl_to_cpp.beef"(%0, %0) : (i32, i32) -> i3214        "test_irdl_to_cpp.conditional"(%test_arg) ({15        ^cond(%test: i1):16          %3 = "test_irdl_to_cpp.bar"() : () -> i3217          "test.terminator"() : ()->()18        }, {19        ^then(%what: i1, %ever: i32):20          %4 = "test_irdl_to_cpp.bar"() : () -> i3221          "test.terminator"() : ()->()22        }, {23        ^else():24          %5 = "test_irdl_to_cpp.bar"() : () -> i3225          "test.terminator"() : ()->()26        }) : (i1) -> ()27        return28    }29 30// CHECK: }31}32