If loop induction variable's start value is less then its exit value then do not...
[oota-llvm.git] / test / Transforms / InstCombine / 2003-07-21-ExternalConstant.ll
index a3c30a8f72752d2d2c6d963a6a02fb8e8e77e102..09732d3f636aedd0ac6e4db117587fef36249aaf 100644 (file)
 ;      should pass through the optimizer without failure.
 ;
 ; Extra code:
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine
+; RUN: llvm-as < %s | opt -instcombine
 ; END.
-;
-
-target endian = little
-target pointersize = 32
-%silly = external constant int         ; <int*> [#uses=1]
 
-implementation   ; Functions:
+target datalayout = "e-p:32:32"
+@silly = external constant i32          ; <i32*> [#uses=1]
 
-declare void %bzero(sbyte*, uint)
+declare void @bzero(i8*, i32)
 
-declare void %bcopy(sbyte*, sbyte*, uint)
+declare void @bcopy(i8*, i8*, i32)
 
-declare int %bcmp(sbyte*, sbyte*, uint)
+declare i32 @bcmp(i8*, i8*, i32)
 
-declare int %fputs(sbyte*, sbyte*)
+declare i32 @fputs(i8*, i8*)
 
-declare int %fputs_unlocked(sbyte*, sbyte*)
+declare i32 @fputs_unlocked(i8*, i8*)
 
-int %function(int %a.1) {
-entry:         ; No predecessors!
-       %a.0 = alloca int               ; <int*> [#uses=2]
-       %result = alloca int            ; <int*> [#uses=2]
-       store int %a.1, int* %a.0
-       %tmp.0 = load int* %a.0         ; <int> [#uses=1]
-       %tmp.1 = load int* %silly               ; <int> [#uses=1]
-       %tmp.2 = add int %tmp.0, %tmp.1         ; <int> [#uses=1]
-       store int %tmp.2, int* %result
-       br label %return
+define i32 @function(i32 %a.1) {
+entry:
+        %a.0 = alloca i32               ; <i32*> [#uses=2]
+        %result = alloca i32            ; <i32*> [#uses=2]
+        store i32 %a.1, i32* %a.0
+        %tmp.0 = load i32* %a.0         ; <i32> [#uses=1]
+        %tmp.1 = load i32* @silly               ; <i32> [#uses=1]
+        %tmp.2 = add i32 %tmp.0, %tmp.1         ; <i32> [#uses=1]
+        store i32 %tmp.2, i32* %result
+        br label %return
 
-return:                ; preds = %entry
-       %tmp.3 = load int* %result              ; <int> [#uses=1]
-       ret int %tmp.3
+return:         ; preds = %entry
+        %tmp.3 = load i32* %result              ; <i32> [#uses=1]
+        ret i32 %tmp.3
 }
+