[llvm-commits] CVS: llvm/test/Regression/Transforms/LowerSetJmp/2003-05-01-PHIProblem.ll Makefile
Chris Lattner
lattner at cs.uiuc.edu
Sat May 17 17:19:00 PDT 2003
Changes in directory llvm/test/Regression/Transforms/LowerSetJmp:
2003-05-01-PHIProblem.ll added (r1.1)
Makefile added (r1.1)
---
Log message:
Initial test
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/LowerSetJmp/2003-05-01-PHIProblem.ll
diff -c /dev/null llvm/test/Regression/Transforms/LowerSetJmp/2003-05-01-PHIProblem.ll:1.1
*** /dev/null Sat May 17 17:18:43 2003
--- llvm/test/Regression/Transforms/LowerSetJmp/2003-05-01-PHIProblem.ll Sat May 17 17:18:33 2003
***************
*** 0 ****
--- 1,29 ----
+ ; RUN: as < %s | opt -lowersetjmp | dis | grep invoke
+
+ %JmpBuf = type int
+ %.str_1 = internal constant [13 x sbyte] c"returned %d\0A\00"
+
+ implementation
+
+ declare void %llvm.longjmp(%JmpBuf *%B, int %Val)
+ declare int %llvm.setjmp(%JmpBuf *%B)
+
+ int %simpletest() {
+ %B = alloca %JmpBuf
+ %Val = call int %llvm.setjmp(%JmpBuf* %B)
+ %V = cast int %Val to bool
+ br bool %V, label %LongJumped, label %Normal
+ Normal:
+ call void %llvm.longjmp(%JmpBuf* %B, int 42)
+ ret int 0 ;; not reached
+ LongJumped:
+ ret int %Val
+ }
+
+ declare int %printf(sbyte*, ...)
+
+ int %main() {
+ %V = call int %simpletest()
+ call int(sbyte*, ...)* %printf(sbyte* getelementptr ([13 x sbyte]* %.str_1, long 0, long 0), int %V)
+ ret int 0
+ }
Index: llvm/test/Regression/Transforms/LowerSetJmp/Makefile
diff -c /dev/null llvm/test/Regression/Transforms/LowerSetJmp/Makefile:1.1
*** /dev/null Sat May 17 17:18:43 2003
--- llvm/test/Regression/Transforms/LowerSetJmp/Makefile Sat May 17 17:18:33 2003
***************
*** 0 ****
--- 1,10 ----
+
+ LEVEL = ../../../..
+ include $(LEVEL)/test/Makefile.tests
+
+ TESTS := $(wildcard *.ll)
+
+ all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out))
+
+ Output/%.ll.out: %.ll Output/.dir $(LOPT)
+ -$(TESTRUNR) $<
More information about the llvm-commits
mailing list