Oops - Re-add the Kaleidoscope regression tests themselves (accidentally left
[oota-llvm.git] / test / Examples / Kaleidoscope / Chapter3.test
1 # RUN: Kaleidoscope-Ch3 < %s 2>&1 | FileCheck %s
2
3 # Test basic parsing and IR generation.
4 def foo(x) x + 1;
5 foo(1);
6
7 # CHECK:      define double @foo(double %x) {
8 # CHECK-NEXT: entry:
9 # CHECK-NEXT:   %addtmp = fadd double %x, 1.000000e+00
10 # CHECK-NEXT:   ret double %addtmp
11 # CHECK-NEXT: }
12
13 # CHECK:      define double @__anon_expr() {
14 # CHECK-NEXT: entry:
15 # CHECK-NEXT:   %calltmp = call double @foo(double 1.000000e+00)
16 # CHECK-NEXT:   ret double %calltmp
17 # CHECK-NEXT: }