[llvm-commits] CVS: llvm/test/Regression/Transforms/LICM/sink_multiple.ll

Chris Lattner lattner at cs.uiuc.edu
Fri Dec 19 00:55:01 PST 2003


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

sink_multiple.ll added (r1.1)

---
Log message:

New testcase


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

Index: llvm/test/Regression/Transforms/LICM/sink_multiple.ll
diff -c /dev/null llvm/test/Regression/Transforms/LICM/sink_multiple.ll:1.1
*** /dev/null	Fri Dec 19 00:54:47 2003
--- llvm/test/Regression/Transforms/LICM/sink_multiple.ll	Fri Dec 19 00:54:37 2003
***************
*** 0 ****
--- 1,19 ----
+ ; The loop sinker was running from the bottom of the loop to the top, causing
+ ; it to miss opportunities to sink instructions that depended on sinking other
+ ; instructions from the loop.  Instead they got hoisted, which is better than
+ ; leaving them in the loop, but increases register pressure pointlessly.
+ 
+ ; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 getelementptr | grep Out:
+ 
+ %Ty = type { int, int }
+ %X = external global %Ty
+ 
+ int %test() {
+         br label %Loop
+ Loop:
+         %dead = getelementptr %Ty* %X, long 0, ubyte 0
+         %sunk2 = load int* %dead
+         br bool false, label %Loop, label %Out
+ Out:
+         ret int %sunk2
+ }





More information about the llvm-commits mailing list