brintos

brintos / llvm-project-archived public Read only

0
0
Text · 823 B · fd46461 Raw
17 lines · plain
1// RUN: mlir-opt -outline-shape-computation -split-input-file %s 2>%t | FileCheck %s2 3func.func @func1(%arg0: !shape.value_shape, %arg1: !shape.value_shape) -> !shape.shape {4  %0 = shape.shape_of %arg0 : !shape.value_shape -> !shape.shape5  %1 = shape.shape_of %arg1 : !shape.value_shape -> !shape.shape6  %2 = shape.meet %0, %1 : !shape.shape, !shape.shape -> !shape.shape7  return %2 : !shape.shape8}9// Make sure with_shape used by call not crash.10// CHECK-LABEL:func.func @func11func.func @func(%arg0: !shape.value_shape, %arg1: !shape.value_shape) -> !shape.shape {12  %0 = shape.shape_of %arg0 : !shape.value_shape -> !shape.shape13  %1 = shape.with_shape %arg1, %0 : !shape.value_shape, !shape.shape14  %2 = call @func1(%arg0, %1) : (!shape.value_shape, !shape.value_shape) -> !shape.shape15  return %2 : !shape.shape16}17