bolt/deps/llvm-18.1.8/mlir/test/Examples/Toy/Ch6/scalar.toy

15 lines
368 B
Text
Raw Normal View History

2025-02-14 19:21:04 +01:00
# RUN: toyc-ch6 %s -emit=mlir 2>&1 | FileCheck %s
def main() {
var a<2, 2> = 5.5;
print(a);
}
# CHECK-LABEL: toy.func @main() {
# CHECK-NEXT: %0 = toy.constant dense<5.500000e+00> : tensor<f64>
# CHECK-NEXT: %1 = toy.reshape(%0 : tensor<f64>) to tensor<2x2xf64>
# CHECK-NEXT: toy.print %1 : tensor<2x2xf64>
# CHECK-NEXT: toy.return
# CHECK-NEXT: }