brintos

brintos / llvm-project-archived public Read only

0
0
Text · 413 B · 9fee8c6 Raw
17 lines · plain
1# RUN: toyc-ch5 %s -emit=mlir -opt 2>&1 | FileCheck %s2 3def main() {4  var a<2,1> = [1, 2];5  var b<2,1> = a;6  var c<2,1> = b;7  print(c);8}9 10# CHECK-LABEL: toy.func @main()11# CHECK-NEXT:    [[VAL_0:%.*]] = toy.constant12# CHECK-SAME: 		dense<[13# CHECK-SAME: 	 	[1.000000e+00], [2.000000e+00]14# CHECK-SAME: 		]> : tensor<2x1xf64>15# CHECK-NEXT:    toy.print [[VAL_0]] : tensor<2x1xf64>16# CHECK-NEXT:    toy.return17