X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FTransforms%2FInstCombine%2F2003-07-21-ExternalConstant.ll;h=f550c8349f84aa4216ef5705ef8865b77963ff3a;hb=dc89737bcdbb8f69d8ae7578bdfa904cabcfc5ed;hp=2fc1b206ac8b126ceb868a9b0941b3fb7c0433c0;hpb=e78760e179caabddb48e158c4628f717995fcbc4;p=oota-llvm.git diff --git a/test/Transforms/InstCombine/2003-07-21-ExternalConstant.ll b/test/Transforms/InstCombine/2003-07-21-ExternalConstant.ll index 2fc1b206ac8..f550c8349f8 100644 --- a/test/Transforms/InstCombine/2003-07-21-ExternalConstant.ll +++ b/test/Transforms/InstCombine/2003-07-21-ExternalConstant.ll @@ -10,37 +10,35 @@ ; should pass through the optimizer without failure. ; ; Extra code: -; RUN: llvm-as < %s | opt -instcombine -; - -target endian = little -target pointersize = 32 -%silly = external constant int ; [#uses=1] +; RUN: opt < %s -instcombine +; END. -implementation ; Functions: +target datalayout = "e-p:32:32" +@silly = external constant 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 ; [#uses=2] - %result = alloca int ; [#uses=2] - store int %a.1, int* %a.0 - %tmp.0 = load int* %a.0 ; [#uses=1] - %tmp.1 = load int* %silly ; [#uses=1] - %tmp.2 = add int %tmp.0, %tmp.1 ; [#uses=1] - store int %tmp.2, int* %result - br label %return +define i32 @function(i32 %a.1) { +entry: + %a.0 = alloca i32 ; [#uses=2] + %result = alloca i32 ; [#uses=2] + store i32 %a.1, i32* %a.0 + %tmp.0 = load i32* %a.0 ; [#uses=1] + %tmp.1 = load i32* @silly ; [#uses=1] + %tmp.2 = add i32 %tmp.0, %tmp.1 ; [#uses=1] + store i32 %tmp.2, i32* %result + br label %return -return: ; preds = %entry - %tmp.3 = load int* %result ; [#uses=1] - ret int %tmp.3 +return: ; preds = %entry + %tmp.3 = load i32* %result ; [#uses=1] + ret i32 %tmp.3 } +