[llvm-commits] CVS: llvm/test/Feature/undefined.ll unreachable.ll

Chris Lattner lattner at cs.uiuc.edu
Sat Oct 16 11:24:25 PDT 2004



Changes in directory llvm/test/Feature:

undefined.ll added (r1.1)
unreachable.ll added (r1.1)
---
Log message:

testcases for undefined and unreachable


---
Diffs of the changes:  (+28 -0)

Index: llvm/test/Feature/undefined.ll
diff -c /dev/null llvm/test/Feature/undefined.ll:1.1
*** /dev/null	Sat Oct 16 13:24:22 2004
--- llvm/test/Feature/undefined.ll	Sat Oct 16 13:24:11 2004
***************
*** 0 ****
--- 1,15 ----
+ 
+ %X = global int undef
+ 
+ implementation
+ 
+ declare int "atoi"(sbyte *)
+ 
+ int %test() {
+ 	ret int undef
+ }
+ 
+ int %test2() {
+ 	%X = add int undef, 1
+ 	ret int %X
+ }


Index: llvm/test/Feature/unreachable.ll
diff -c /dev/null llvm/test/Feature/unreachable.ll:1.1
*** /dev/null	Sat Oct 16 13:24:25 2004
--- llvm/test/Feature/unreachable.ll	Sat Oct 16 13:24:11 2004
***************
*** 0 ****
--- 1,13 ----
+ 
+ implementation
+ 
+ declare void %bar()
+ 
+ int %foo() {  ;; Calling this function has undefined behavior
+ 	unreachable
+ }
+ 
+ double %xyz() {
+ 	call void %bar()
+ 	unreachable          ;; Bar must not return.
+ }






More information about the llvm-commits mailing list