bolt/deps/llvm-18.1.8/mlir/test/Examples/Toy/Ch6/trivial_reshape.toy
2025-02-14 19:21:04 +01:00

16 lines
413 B
Text

# RUN: toyc-ch6 %s -emit=mlir -opt 2>&1 | FileCheck %s
def main() {
var a<2,1> = [1, 2];
var b<2,1> = a;
var c<2,1> = b;
print(c);
}
# CHECK-LABEL: toy.func @main()
# CHECK-NEXT: [[VAL_0:%.*]] = toy.constant
# CHECK-SAME: dense<[
# CHECK-SAME: [1.000000e+00], [2.000000e+00]
# CHECK-SAME: ]> : tensor<2x1xf64>
# CHECK-NEXT: toy.print [[VAL_0]] : tensor<2x1xf64>
# CHECK-NEXT: toy.return