[x86] Fix disassembly of callw instruction
[oota-llvm.git] / test / Transforms / Mem2Reg / PromoteMemToRegister.ll
index ea30cdb5b8f3ea656a66d814e38caf0976da85ab..1be6b03beec6d4a396b15fd543ae4dfb33cf82ad 100644 (file)
@@ -1,24 +1,18 @@
 ; Simple sanity check testcase.  Both alloca's should be eliminated.
-; RUN: as < %s | opt -mem2reg | dis | not grep 'alloca'
+; RUN: opt < %s -mem2reg -S | not grep alloca
 
-implementation
-
-double "testfunc"(int %i, double %j)
-begin
-       %I = alloca int
-       %J = alloca double
-
-       store int %i, int* %I
+define double @testfunc(i32 %i, double %j) {
+       %I = alloca i32         ; <i32*> [#uses=4]
+       %J = alloca double              ; <double*> [#uses=2]
+       store i32 %i, i32* %I
        store double %j, double* %J
-
-       %t1 = load int* %I
-       %t2 = add int %t1, 1
-       store int %t2, int* %I
-
-       %t3 = load int* %I
-       %t4 = cast int %t3 to double
-       %t5 = load double* %J
-       %t6 = mul double %t4, %t5
-
+       %t1 = load i32* %I              ; <i32> [#uses=1]
+       %t2 = add i32 %t1, 1            ; <i32> [#uses=1]
+       store i32 %t2, i32* %I
+       %t3 = load i32* %I              ; <i32> [#uses=1]
+       %t4 = sitofp i32 %t3 to double          ; <double> [#uses=1]
+       %t5 = load double* %J           ; <double> [#uses=1]
+       %t6 = fmul double %t4, %t5              ; <double> [#uses=1]
        ret double %t6
-end
+}
+