[llvm-commits] [llvm] r45478 - /llvm/trunk/test/Transforms/LICM/scalar_promote.ll
Bill Wendling
isanbard at gmail.com
Mon Dec 31 17:34:37 PST 2007
Author: void
Date: Mon Dec 31 19:34:36 2007
New Revision: 45478
URL: http://llvm.org/viewvc/llvm-project?rev=45478&view=rev
Log:
Update this testcase. The output needs to be disabled to pass.
Modified:
llvm/trunk/test/Transforms/LICM/scalar_promote.ll
Modified: llvm/trunk/test/Transforms/LICM/scalar_promote.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/scalar_promote.ll?rev=45478&r1=45477&r2=45478&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LICM/scalar_promote.ll (original)
+++ llvm/trunk/test/Transforms/LICM/scalar_promote.ll Mon Dec 31 19:34:36 2007
@@ -1,37 +1,35 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -licm -stats |& \
+; RUN: llvm-as < %s | opt -licm -disable-output -stats |& \
; RUN: grep {memory locations promoted to register}
+ at X = global i32 7 ; <i32*> [#uses=4]
-%X = global int 7
-
-void %testfunc(int %i) {
+define void @testfunc(i32 %i) {
+; <label>:0
br label %Loop
-Loop:
- %j = phi uint [0, %0], [%Next, %Loop]
-
- %x = load int* %X ; Should promote this to a register inside of loop!
- %x2 = add int %x, 1
- store int %x2, int* %X
-
- %Next = add uint %j, 1
- %cond = seteq uint %Next, 0
- br bool %cond, label %Out, label %Loop
+Loop: ; preds = %Loop, %0
+ %j = phi i32 [ 0, %0 ], [ %Next, %Loop ] ; <i32> [#uses=1]
+ %x = load i32* @X ; <i32> [#uses=1]
+ %x2 = add i32 %x, 1 ; <i32> [#uses=1]
+ store i32 %x2, i32* @X
+ %Next = add i32 %j, 1 ; <i32> [#uses=2]
+ %cond = icmp eq i32 %Next, 0 ; <i1> [#uses=1]
+ br i1 %cond, label %Out, label %Loop
-Out:
+Out: ; preds = %Loop
ret void
}
-void %testhard(int %i) {
+define void @testhard(i32 %i) {
br label %Loop
-Loop:
- %X1 = getelementptr int* %X, long 0
- %A = load int* %X1 ; Aliases X, needs to be rewritten
- %V = add int %A, 1
- %X2 = getelementptr int* %X, long 0
- store int %V, int* %X2
- br bool false, label %Loop, label %Exit
-Exit:
- ret void
+Loop: ; preds = %Loop, %0
+ %X1 = getelementptr i32* @X, i64 0 ; <i32*> [#uses=1]
+ %A = load i32* %X1 ; <i32> [#uses=1]
+ %V = add i32 %A, 1 ; <i32> [#uses=1]
+ %X2 = getelementptr i32* @X, i64 0 ; <i32*> [#uses=1]
+ store i32 %V, i32* %X2
+ br i1 false, label %Loop, label %Exit
+Exit: ; preds = %Loop
+ ret void
}
More information about the llvm-commits
mailing list