summaryrefslogtreecommitdiffstats
path: root/llvm/test/Examples/Kaleidoscope/Chapter3.test
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-08-27 20:33:22 +0000
committerLang Hames <lhames@gmail.com>2015-08-27 20:33:22 +0000
commite2edcdcd934d3134114476beb098716331ecbf39 (patch)
treeb21773287b8a62401794ebd1f740f8db3d69c211 /llvm/test/Examples/Kaleidoscope/Chapter3.test
parent53b2afa28f6592f8e85b2f97e83f219dc8dde891 (diff)
downloadbcm5719-llvm-e2edcdcd934d3134114476beb098716331ecbf39.tar.gz
bcm5719-llvm-e2edcdcd934d3134114476beb098716331ecbf39.zip
Oops - Re-add the Kaleidoscope regression tests themselves (accidentally left
out of r246201). llvm-svn: 246203
Diffstat (limited to 'llvm/test/Examples/Kaleidoscope/Chapter3.test')
-rw-r--r--llvm/test/Examples/Kaleidoscope/Chapter3.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Examples/Kaleidoscope/Chapter3.test b/llvm/test/Examples/Kaleidoscope/Chapter3.test
new file mode 100644
index 00000000000..b9c8ba6fad8
--- /dev/null
+++ b/llvm/test/Examples/Kaleidoscope/Chapter3.test
@@ -0,0 +1,17 @@
+# RUN: Kaleidoscope-Ch3 < %s 2>&1 | FileCheck %s
+
+# Test basic parsing and IR generation.
+def foo(x) x + 1;
+foo(1);
+
+# CHECK: define double @foo(double %x) {
+# CHECK-NEXT: entry:
+# CHECK-NEXT: %addtmp = fadd double %x, 1.000000e+00
+# CHECK-NEXT: ret double %addtmp
+# CHECK-NEXT: }
+
+# CHECK: define double @__anon_expr() {
+# CHECK-NEXT: entry:
+# CHECK-NEXT: %calltmp = call double @foo(double 1.000000e+00)
+# CHECK-NEXT: ret double %calltmp
+# CHECK-NEXT: }
OpenPOWER on IntegriCloud