[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 12 09:59:00 PDT 2003


Changes in directory llvm/test/Regression/Transforms/InstCombine:

2003-08-12-AllocaNonNull.ll added (r1.1)

---
Log message:

Testcase for feature we should support eventually


---
Diffs of the changes:

Index: llvm/test/Regression/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll
diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll:1.1
*** /dev/null	Tue Aug 12 09:58:18 2003
--- llvm/test/Regression/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll	Tue Aug 12 09:58:08 2003
***************
*** 0 ****
--- 1,22 ----
+ ; This testcase can be simplified by "realizing" that alloca can never return 
+ ; null.
+ ; RUN: as < %s | opt -instcombine -simplifycfg | dis | not grep 'br '
+ 
+ implementation   ; Functions:
+ 
+ declare int %bitmap_clear(...)
+ 
+ int %oof() {
+ entry:
+         %live_head = alloca int         ; <int*> [#uses=2]
+         %tmp.1 = setne int* %live_head, null            ; <bool> [#uses=1]
+         br bool %tmp.1, label %then, label %UnifiedExitNode
+ 
+ then:
+         %tmp.4 = call int (...)* %bitmap_clear( int* %live_head )              ; <int> [#uses=0]
+         br label %UnifiedExitNode
+ 
+ UnifiedExitNode:
+         ret int 0
+ }
+ 





More information about the llvm-commits mailing list