[llvm-commits] CVS: llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll

John Criswell criswell at choi.cs.uiuc.edu
Thu Jun 26 16:41:54 PDT 2003


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

2003-06-26-IterativePromote.ll added (r1.1.2.1)

---
Log message:

Merged with mainline on Thursday, June 26, 2003.


---
Diffs of the changes:

Index: llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll
diff -c /dev/null llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll:1.1
*** /dev/null	Thu Jun 26 16:37:33 2003
--- llvm/test/Regression/Transforms/Mem2Reg/2003-06-26-IterativePromote.ll	Wed Jun 25 09:55:30 2003
***************
*** 0 ****
--- 1,19 ----
+ ; Promoting some values allows promotion of other values.
+ ; RUN: if as < %s | opt -mem2reg | dis | grep alloca
+ ; RUN: then exit 1
+ ; RUN: else exit 0
+ ; RUN: fi
+ 
+ int %test2() {
+         %result = alloca int             ; ty=int*
+         %a = alloca int          ; ty=int*
+         %p = alloca int*                 ; ty=int**
+         store int 0, int* %a
+         store int* %a, int** %p
+         %tmp.0 = load int** %p           ; ty=int*
+         %tmp.1 = load int* %tmp.0                ; ty=int
+         store int %tmp.1, int* %result
+         %tmp.2 = load int* %result               ; ty=int
+         ret int %tmp.2
+ }
+ 





More information about the llvm-commits mailing list